Issue with unicode exponents

classic Classic list List threaded Threaded
16 messages Options
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Issue with unicode exponents

Dear Stéphane,

Thank you for your on-going efforts to improve the display of polynomials and their exponents.
Although i was aware about the potential issue, i did not catch it before your first commit was recently merged.

Actually, some trial on the master shows what we could expect on Windows: Setting exponents in unicode breaks the display of polynomials in NW (and NWNI) modes:

--> p = (1-%z).^(0:12)'
 p  =

   1

   1 -z

   1 -2z +z┬▓

   1 -3z +3z┬▓ -z┬│

   1 -4z +6z┬▓ -4z┬│ +zÔü┤

   1 -5z +10z┬▓ -10z┬│ +5zÔü┤ -zÔüÁ

   1 -6z +15z┬▓ -20z┬│ +15zÔü┤ -6zÔüÁ +zÔüÂ

   1 -7z +21z┬▓ -35z┬│ +35zÔü┤ -21zÔüÁ +7zÔü -zÔüÀ

   1 -8z +28z┬▓ -56z┬│ +70zÔü┤ -56zÔüÁ +28zÔü -8zÔüÀ +zÔü©

   1 -9z +36z┬▓ -84z┬│ +126zÔü┤ -126zÔüÁ +84zÔü -36zÔüÀ +9zÔü© -zÔü╣

   1 -10z +45z┬▓ -120z┬│ +210zÔü┤ -252zÔüÁ +210zÔü -120zÔüÀ +45zÔü© -10zÔü╣ +z┬╣Ôü░

   1 -11z +55z┬▓ -165z┬│ +330zÔü┤ -462zÔüÁ +462zÔü -330zÔüÀ +165zÔü© -55zÔü╣ +11z┬╣Ôü░
  -z┬╣┬╣

   1 -12z +66z┬▓ -220z┬│ +495zÔü┤ -792zÔüÁ +924zÔü -792zÔüÀ +495zÔü© -220zÔü╣ +66z┬╣Ôü░
  -12z┬╣┬╣ +z┬╣┬▓

This is a blocking issue. IMHO, the fix proposed by Allan clearly improves the situation, but is not completely clean as it is implemented in the launching batch file, while calling directly the binary will shortcut the patch.

Another issue is about the readability of exponents 1 to 3: they were likely the first defined, before other figures, but they are clearly smaller than other exponents 0 and 4-9.
Reading them was almost OK for me in the commit message, but on the Scilab console, i had to increase the font size from Monospaced 13 to Monospaced 15 to get them (almost) readable.
I copied/pasted a polynomial from the console into Scinotes, zoomed Scinotes, and got the following screenshot, showing the net difference in their sizes: :

Without zooming, the "3" is very close to 8, and only its place before 4 mainly indicates that it's not 8.
Could the 1-3 exponents be redefined with the same size as the other higher figures, under other unicode ids?
To be investigated.

Best regards
Samuel


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

Le 28/11/2019 à 21:58, Samuel Gougeon a écrit :

Without zooming, the "3" is very close to 8, and only its place before 4 mainly indicates that it's not 8.
Could the 1-3 exponents be redefined with the same size as the other higher figures, under other unicode ids?


Aaarr, apparently no: https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts



_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Antoine ELIAS-2 Antoine ELIAS-2
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Samuel GOUGEON
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )

But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration



Le 28/11/2019 à 21:58, Samuel Gougeon a écrit :

Dear Stéphane,

Thank you for your on-going efforts to improve the display of polynomials and their exponents.
Although i was aware about the potential issue, i did not catch it before your first commit was recently merged.

Actually, some trial on the master shows what we could expect on Windows: Setting exponents in unicode breaks the display of polynomials in NW (and NWNI) modes:

--> p = (1-%z).^(0:12)'
 p  =

   1

   1 -z

   1 -2z +z┬▓

   1 -3z +3z┬▓ -z┬│

   1 -4z +6z┬▓ -4z┬│ +zÔü┤

   1 -5z +10z┬▓ -10z┬│ +5zÔü┤ -zÔüÁ

   1 -6z +15z┬▓ -20z┬│ +15zÔü┤ -6zÔüÁ +zÔüÂ

   1 -7z +21z┬▓ -35z┬│ +35zÔü┤ -21zÔüÁ +7zÔü -zÔüÀ

   1 -8z +28z┬▓ -56z┬│ +70zÔü┤ -56zÔüÁ +28zÔü -8zÔüÀ +zÔü©

   1 -9z +36z┬▓ -84z┬│ +126zÔü┤ -126zÔüÁ +84zÔü -36zÔüÀ +9zÔü© -zÔü╣

   1 -10z +45z┬▓ -120z┬│ +210zÔü┤ -252zÔüÁ +210zÔü -120zÔüÀ +45zÔü© -10zÔü╣ +z┬╣Ôü░

   1 -11z +55z┬▓ -165z┬│ +330zÔü┤ -462zÔüÁ +462zÔü -330zÔüÀ +165zÔü© -55zÔü╣ +11z┬╣Ôü░
  -z┬╣┬╣

   1 -12z +66z┬▓ -220z┬│ +495zÔü┤ -792zÔüÁ +924zÔü -792zÔüÀ +495zÔü© -220zÔü╣ +66z┬╣Ôü░
  -12z┬╣┬╣ +z┬╣┬▓

This is a blocking issue. IMHO, the fix proposed by Allan clearly improves the situation, but is not completely clean as it is implemented in the launching batch file, while calling directly the binary will shortcut the patch.

Another issue is about the readability of exponents 1 to 3: they were likely the first defined, before other figures, but they are clearly smaller than other exponents 0 and 4-9.
Reading them was almost OK for me in the commit message, but on the Scilab console, i had to increase the font size from Monospaced 13 to Monospaced 15 to get them (almost) readable.
I copied/pasted a polynomial from the console into Scinotes, zoomed Scinotes, and got the following screenshot, showing the net difference in their sizes: :

Without zooming, the "3" is very close to 8, and only its place before 4 mainly indicates that it's not 8.
Could the 1-3 exponents be redefined with the same size as the other higher figures, under other unicode ids?
To be investigated.

Best regards
Samuel


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.


But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.
By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

Nevertheless, i am a bit afraid that with all this UTF-8 stuff, the display result depends on some locales.
When i write help pages in Notepad++ in UTF-8 encoding, when i copy/past some UTF-8 (see below),
sometimes it's OK, sometimes i get only rectangles... Not clear why..

Samuel

-----------------------------

// http://bugzilla.scilab.org/9221
%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Antoine ELIAS-2 Antoine ELIAS-2
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents



Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.

I hope https://codereview.scilab.org/#/c/21143/ will help.



But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.
By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

Nevertheless, i am a bit afraid that with all this UTF-8 stuff, the display result depends on some locales.
When i write help pages in Notepad++ in UTF-8 encoding, when i copy/past some UTF-8 (see below),
sometimes it's OK, sometimes i get only rectangles... Not clear why..

Samuel

-----------------------------

// http://bugzilla.scilab.org/9221
%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Samuel GOUGEON

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 could be, at least, a rendering option (BTW we need an unified way of customizing display in the preferences tab). 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/). 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

The rendering of super/subscripts was very easy 40 years ago when terminals were printing on paper listing. See e.g. http://man7.org/linux/man-pages/man5/terminfo.5.html :

"If  the  terminal  can  move  up  or  down  half  a line, this can be
       indicated with hu (half-line up) and hd (half-line  down).   This  is
       primarily   useful  for  superscripts  and  subscripts  on  hard-copy
       terminals."

and search e.g. for enter_subscript_mode, exit_subscript_mode. Today none of terminal emulator supports these commands, excepted the very recent release of mintty (Windows):

http://cygwin.1069669.n5.nabble.com/ANNOUNCEMENT-Updated-mintty-3-0-1-td146161.html

here is a excerpt of the release notes:

Highlights
   * New character attributes superscript, subscript, shadowed, overstrike.
   * DEC VT420 screen control features.
   * Fully VT100-compatible, including VT52 mode (with graphics).
   * Up to 6 key modifiers, including Meta (Win key) and configurable

Hence, using mintty console would allow a neat display of polynomials in CLI mode.

S.


Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.


But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.
By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

Nevertheless, i am a bit afraid that with all this UTF-8 stuff, the display result depends on some locales.
When i write help pages in Notepad++ in UTF-8 encoding, when i copy/past some UTF-8 (see below),
sometimes it's OK, sometimes i get only rectangles... Not clear why..

Samuel

-----------------------------

// http://bugzilla.scilab.org/9221
%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Antoine ELIAS-2

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 could be, at least, a rendering option (BTW we need an unified way of customizing display in the preferences tab). 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/). 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

The rendering of super/subscripts was very easy 40 years ago when terminals were printing on paper listing. See e.g. http://man7.org/linux/man-pages/man5/terminfo.5.html :

"If  the  terminal  can  move  up  or  down  half  a line, this can be
       indicated with hu (half-line up) and hd (half-line  down).   This  is
       primarily   useful  for  superscripts  and  subscripts  on  hard-copy
       terminals."

and search e.g. for enter_subscript_mode, exit_subscript_mode. Today none of terminal emulator supports these commands, excepted the very recent release of mintty (Windows):

http://cygwin.1069669.n5.nabble.com/ANNOUNCEMENT-Updated-mintty-3-0-1-td146161.html

here is a excerpt of the release notes:

Highlights
   * New character attributes superscript, subscript, shadowed, overstrike.
   * DEC VT420 screen control features.
   * Fully VT100-compatible, including VT52 mode (with graphics).
   * Up to 6 key modifiers, including Meta (Win key) and configurable

Hence, using mintty console would allow a neat display of polynomials in CLI mode.

S.
Le 29/11/2019 à 00:36, Antoine ELIAS a écrit :


Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.

I hope https://codereview.scilab.org/#/c/21143/ will help.



But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.
By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

Nevertheless, i am a bit afraid that with all this UTF-8 stuff, the display result depends on some locales.
When i write help pages in Notepad++ in UTF-8 encoding, when i copy/past some UTF-8 (see below),
sometimes it's OK, sometimes i get only rectangles... Not clear why..

Samuel

-----------------------------

// http://bugzilla.scilab.org/9221
%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In fact, it is already supportted in the current version of mintty, even if not documented via the command "infocmp screen", as it can be seen in the attached screenshot...

But it is a pity that this extension is not supported by any terminal in OSx or Linux...

S.

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 could be, at least, a rendering option (BTW we need an unified way of customizing display in the preferences tab). 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/). 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

The rendering of super/subscripts was very easy 40 years ago when terminals were printing on paper listing. See e.g. http://man7.org/linux/man-pages/man5/terminfo.5.html :

"If  the  terminal  can  move  up  or  down  half  a line, this can be
       indicated with hu (half-line up) and hd (half-line  down).   This  is
       primarily   useful  for  superscripts  and  subscripts  on  hard-copy
       terminals."

and search e.g. for enter_subscript_mode, exit_subscript_mode. Today none of terminal emulator supports these commands, excepted the very recent release of mintty (Windows):

http://cygwin.1069669.n5.nabble.com/ANNOUNCEMENT-Updated-mintty-3-0-1-td146161.html

here is a excerpt of the release notes:

Highlights
   * New character attributes superscript, subscript, shadowed, overstrike.
   * DEC VT420 screen control features.
   * Fully VT100-compatible, including VT52 mode (with graphics).
   * Up to 6 key modifiers, including Meta (Win key) and configurable

Hence, using mintty console would allow a neat display of polynomials in CLI mode.

S.
Le 29/11/2019 à 00:36, Antoine ELIAS a écrit :


Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.

I hope https://codereview.scilab.org/#/c/21143/ will help.



But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.
By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

Nevertheless, i am a bit afraid that with all this UTF-8 stuff, the display result depends on some locales.
When i write help pages in Notepad++ in UTF-8 encoding, when i copy/past some UTF-8 (see below),
sometimes it's OK, sometimes i get only rectangles... Not clear why..

Samuel

-----------------------------

// http://bugzilla.scilab.org/9221
%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev

mintty.png (19K) Download Attachment
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

It also works in the bash console of "Git for windows".

Le 29/11/2019 à 12:14, Stéphane Mottelet a écrit :

In fact, it is already supportted in the current version of mintty, even if not documented via the command "infocmp screen", as it can be seen in the attached screenshot...

But it is a pity that this extension is not supported by any terminal in OSx or Linux...

S.

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 could be, at least, a rendering option (BTW we need an unified way of customizing display in the preferences tab). 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/). 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

The rendering of super/subscripts was very easy 40 years ago when terminals were printing on paper listing. See e.g. http://man7.org/linux/man-pages/man5/terminfo.5.html :

"If  the  terminal  can  move  up  or  down  half  a line, this can be
       indicated with hu (half-line up) and hd (half-line  down).   This  is
       primarily   useful  for  superscripts  and  subscripts  on  hard-copy
       terminals."

and search e.g. for enter_subscript_mode, exit_subscript_mode. Today none of terminal emulator supports these commands, excepted the very recent release of mintty (Windows):

http://cygwin.1069669.n5.nabble.com/ANNOUNCEMENT-Updated-mintty-3-0-1-td146161.html

here is a excerpt of the release notes:

Highlights
   * New character attributes superscript, subscript, shadowed, overstrike.
   * DEC VT420 screen control features.
   * Fully VT100-compatible, including VT52 mode (with graphics).
   * Up to 6 key modifiers, including Meta (Win key) and configurable

Hence, using mintty console would allow a neat display of polynomials in CLI mode.

S.
Le 29/11/2019 à 00:36, Antoine ELIAS a écrit :


Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.

I hope https://codereview.scilab.org/#/c/21143/ will help.



But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.
By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

Nevertheless, i am a bit afraid that with all this UTF-8 stuff, the display result depends on some locales.
When i write help pages in Notepad++ in UTF-8 encoding, when i copy/past some UTF-8 (see below),
sometimes it's OK, sometimes i get only rectangles... Not clear why..

Samuel

-----------------------------

// http://bugzilla.scilab.org/9221
%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Samuel GOUGEON

BTW, under Windows, none of the console mode seems to support simple accented characters :

--> disp "é"

 
 ├®

The super/subscript problem is just a small part of this more general issue.

S.

Le 28/11/2019 à 21:58, Samuel Gougeon a écrit :

Dear Stéphane,

Thank you for your on-going efforts to improve the display of polynomials and their exponents.
Although i was aware about the potential issue, i did not catch it before your first commit was recently merged.

Actually, some trial on the master shows what we could expect on Windows: Setting exponents in unicode breaks the display of polynomials in NW (and NWNI) modes:

--> p = (1-%z).^(0:12)'
 p  =

   1

   1 -z

   1 -2z +z┬▓

   1 -3z +3z┬▓ -z┬│

   1 -4z +6z┬▓ -4z┬│ +zÔü┤

   1 -5z +10z┬▓ -10z┬│ +5zÔü┤ -zÔüÁ

   1 -6z +15z┬▓ -20z┬│ +15zÔü┤ -6zÔüÁ +zÔüÂ

   1 -7z +21z┬▓ -35z┬│ +35zÔü┤ -21zÔüÁ +7zÔü -zÔüÀ

   1 -8z +28z┬▓ -56z┬│ +70zÔü┤ -56zÔüÁ +28zÔü -8zÔüÀ +zÔü©

   1 -9z +36z┬▓ -84z┬│ +126zÔü┤ -126zÔüÁ +84zÔü -36zÔüÀ +9zÔü© -zÔü╣

   1 -10z +45z┬▓ -120z┬│ +210zÔü┤ -252zÔüÁ +210zÔü -120zÔüÀ +45zÔü© -10zÔü╣ +z┬╣Ôü░

   1 -11z +55z┬▓ -165z┬│ +330zÔü┤ -462zÔüÁ +462zÔü -330zÔüÀ +165zÔü© -55zÔü╣ +11z┬╣Ôü░
  -z┬╣┬╣

   1 -12z +66z┬▓ -220z┬│ +495zÔü┤ -792zÔüÁ +924zÔü -792zÔüÀ +495zÔü© -220zÔü╣ +66z┬╣Ôü░
  -12z┬╣┬╣ +z┬╣┬▓

This is a blocking issue. IMHO, the fix proposed by Allan clearly improves the situation, but is not completely clean as it is implemented in the launching batch file, while calling directly the binary will shortcut the patch.

Another issue is about the readability of exponents 1 to 3: they were likely the first defined, before other figures, but they are clearly smaller than other exponents 0 and 4-9.
Reading them was almost OK for me in the commit message, but on the Scilab console, i had to increase the font size from Monospaced 13 to Monospaced 15 to get them (almost) readable.
I copied/pasted a polynomial from the console into Scinotes, zoomed Scinotes, and got the following screenshot, showing the net difference in their sizes: :

Without zooming, the "3" is very close to 8, and only its place before 4 mainly indicates that it's not 8.
Could the 1-3 exponents be redefined with the same size as the other higher figures, under other unicode ids?
To be investigated.

Best regards
Samuel


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Samuel GOUGEON

Sorry for these multiple answers, but after thinking about this issue, I arrived at the conclusion that we should consider the use of unicode subscript only as a failsafe solution. In GUI mode (Java console), we should use html output. This will solve the problem of readability of exponents and allow many interesting stuff, such as outputing links, ...

S.

Le 28/11/2019 à 21:58, Samuel Gougeon a écrit :

Dear Stéphane,

Thank you for your on-going efforts to improve the display of polynomials and their exponents.
Although i was aware about the potential issue, i did not catch it before your first commit was recently merged.

Actually, some trial on the master shows what we could expect on Windows: Setting exponents in unicode breaks the display of polynomials in NW (and NWNI) modes:

--> p = (1-%z).^(0:12)'
 p  =

   1

   1 -z

   1 -2z +z┬▓

   1 -3z +3z┬▓ -z┬│

   1 -4z +6z┬▓ -4z┬│ +zÔü┤

   1 -5z +10z┬▓ -10z┬│ +5zÔü┤ -zÔüÁ

   1 -6z +15z┬▓ -20z┬│ +15zÔü┤ -6zÔüÁ +zÔüÂ

   1 -7z +21z┬▓ -35z┬│ +35zÔü┤ -21zÔüÁ +7zÔü -zÔüÀ

   1 -8z +28z┬▓ -56z┬│ +70zÔü┤ -56zÔüÁ +28zÔü -8zÔüÀ +zÔü©

   1 -9z +36z┬▓ -84z┬│ +126zÔü┤ -126zÔüÁ +84zÔü -36zÔüÀ +9zÔü© -zÔü╣

   1 -10z +45z┬▓ -120z┬│ +210zÔü┤ -252zÔüÁ +210zÔü -120zÔüÀ +45zÔü© -10zÔü╣ +z┬╣Ôü░

   1 -11z +55z┬▓ -165z┬│ +330zÔü┤ -462zÔüÁ +462zÔü -330zÔüÀ +165zÔü© -55zÔü╣ +11z┬╣Ôü░
  -z┬╣┬╣

   1 -12z +66z┬▓ -220z┬│ +495zÔü┤ -792zÔüÁ +924zÔü -792zÔüÀ +495zÔü© -220zÔü╣ +66z┬╣Ôü░
  -12z┬╣┬╣ +z┬╣┬▓

This is a blocking issue. IMHO, the fix proposed by Allan clearly improves the situation, but is not completely clean as it is implemented in the launching batch file, while calling directly the binary will shortcut the patch.

Another issue is about the readability of exponents 1 to 3: they were likely the first defined, before other figures, but they are clearly smaller than other exponents 0 and 4-9.
Reading them was almost OK for me in the commit message, but on the Scilab console, i had to increase the font size from Monospaced 13 to Monospaced 15 to get them (almost) readable.
I copied/pasted a polynomial from the console into Scinotes, zoomed Scinotes, and got the following screenshot, showing the net difference in their sizes: :

Without zooming, the "3" is very close to 8, and only its place before 4 mainly indicates that it's not 8.
Could the 1-3 exponents be redefined with the same size as the other higher figures, under other unicode ids?
To be investigated.

Best regards
Samuel


_______________________________________________
dev mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/dev
-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Samuel GOUGEON
Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )


Great.


But I does not show trouble with 2 or 3 and others superscript numbers.



With this configuration


Neither does it for me, provided that this setting is done before running Scilab.


Humm, mainly provided that the code page was changed to 65001 before this font setting.

By the way, Lucida console is much UTF-8-richer than Consolas (you may test the text below in Scinotes with both fonts, and compare their renderings), and superscripts 0,4-9 are bigger.

I don't know what tests i did, but on my computer as well, superscripts are displayed with Consolas, but NOT with Lucida Console, that looks less rich on this aspect. But much poorer than DejaVue Mono, that however is not in the list of default TrueType fonts of Windows (7) computers, contrarily to Consolas and Lucida console.




_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by Antoine ELIAS-2
Le 29/11/2019 à 00:36, Antoine ELIAS a écrit :


Le 28/11/2019 à 23:35, Samuel Gougeon a écrit :
Hello Antoine,

Le 28/11/2019 à 23:17, Antoine ELIAS a écrit :
Hello Samuel,

I'm agree with you about the issue.
I will try to find a way to change the console properties inside binary like when we change color in nw mode ( W/B vs B/W )

Great.

I hope https://codereview.scilab.org/#/c/21143/ will help.


It great to force the code page in the binaries. That's a pre-requisite to then be able to set a TrueType font and to take it actually working in the terminal. So i will abandon my commit setting the code page in the batch. Thanks.

But always forcing the font to Consolas without testing -- if possible -- if a TrueType font is already set instead of Raster, would reset any richer user setting like for DejaVu Mono. This could be easily blocking.
So, if the binary does not detect the current font and does not test if it's already a TrueType UTF-8 one or not, the font should not be forced.

It then will be easy to add some short indications in the documentation to drive users to change the font to use a rich one required by the user locale.
When we set the font of the terminal on Windows, it is saved in the registry, and then all forthcoming opened terminals use the same relevant font. So it's only a one-time operation.

Samuel


%chars.greek.lower       = "αβγδεϵζηθικλμνξοπρστυφϕχψωάϐέήϑίϊϰόϱςύϋΰϖώ";
%chars.greek.upper       = "ΑΒΓΔΕΖΗΘϴΙΪΚΛΜΝΞΟΠΡΣΤΥΫΦΧΨΩ";
%chars.maths.logical     = "∀∃∄∧∨⋀⋁⊼⊽⊻∁∴∵∎≍";
%chars.maths.set         = "∉∈∊∍∋∌∅∖⋂∩⋃∪⊂⊆⊄⊅⊇⊃⋐⋑⋒⋓";
%chars.maths.comparisons = "⋘≪≤≲≳≥≫⋙≠≃≄≅≈∽≐≔≕≝";
%chars.maths.operators   = "−±∓∔÷×∏∐∑√∛∜⋅⋆⊕⊖⊝⊗⊘⊙⊚⊛⊜⊞⊟⊠⊡";
%chars.maths.integdiff   = "∂∇∆∫∬∭∮∯∰∱∲∳";
%chars.maths.geometry    = "°′″∟⊾∠∡∢⊥∥∦∺∻≎⊿⋕";
%chars.maths.misc        = "⋮⋰⋯⋱′″∝∞‰‱";
%chars.arrows.base       = "←↖↑↗→↘↓↙↔↕↵↱↴☇⇐⇑⇒⇓⇔⊣⊥⊢⊤";
%chars.arrows.thick      = "⬅⬆➞⬇➚➙➘➔➜➡➥➦➧➨➼➽";
%chars.symbols           = "…⋈⋔⋄♢◊♤♧♡♦♠♣♥©®™♀♂⌘♻«»🚌🚲🚩";
%chars.stars             = "⋆★☆✫✯✰✭✡🔯⊛⍟✪❂✻✼✹✸✶";
//%chars.currencies        = "¤$€£¥円元₪฿¢₫₣";

%chars.lang.french       = "âàäçéêèëîïôöûùüÂÀÄÇÉÊÈËÎÏÔÖÛÙÜ";
%chars.lang.japanese.hiragana.a = "あかさたなはまやらわ がざだばぱ";
%chars.lang.japanese.hiragana.i = "いきしちにひみ りゐ ぎじぢびぴ";
%chars.lang.japanese.hiragana.u = "うくすつぬふむゆる  ぐずづぶぷ";
%chars.lang.japanese.hiragana.e = "えけせてねへめ れゑ げぜでべぺ";
%chars.lang.japanese.hiragana.o = "おこそとのほもよろをんごぞどぼぽ";
%chars.lang.russian.upper = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"; 
%chars.lang.russian.lower = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by mottelet
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

_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by mottelet
Le 29/11/2019 à 13:05, Stéphane Mottelet a écrit :

>
> BTW, under Windows, none of the console mode seems to support simple
> accented characters :
>
> --> disp "é"
>
>  ├®
>
> The super/subscript problem is just a small part of this more general
> issue.
>

Yes, sure. This is the point of the long standing reported bug
mentionned in my first message.


_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: Issue with unicode exponents

In reply to this post by mottelet
Le 29/11/2019 à 13:20, Stéphane Mottelet a écrit :

Sorry for these multiple answers, but after thinking about this issue, I arrived at the conclusion that we should consider the use of unicode subscript only as a failsafe solution. In GUI mode (Java console), we should use html output. This will solve the problem of readability of exponents and allow many interesting stuff, such as outputing links, ...


This was possible in some master (in 5.3 or 5.4?), when Calixte developed the scimax module.
In the scimax home page, there were some examples using and rendering latex expressions in the console,
including loading images (like the puffin :-) with \includegraphics.
And it nicely worked, indeed.
Unfortunately, this feature was removed. AFAIK and remember, it set some security issue.

Being able to style and/or make some output active would be very useful, indeed.

For instance to

  • use different colors to display instructions lines, results, warnings, and error messages (reported bugs)
  • set internal or external hyperlinks
  • etc

Whatever is the implementation, some effects would have to be managed to keep clean and clear the history, the diary(), and may be other existing features related to the console inputs or/and outputs.

Samuel



_______________________________________________
dev mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/dev