Where do I report that 1-1=2 :)

71 views
Skip to first unread message

Ray Rogers

unread,
Jun 5, 2022, 9:50:41 AM6/5/22
to Sage-support
show('1_1=',2)
Works fine in console mode.
In jupyter and jupyterlab:

1-1=2

It seems to be auto-corrected; I see the correct output momentarily then
it gets "corrected".
Where should I report it?

Sagemath 9.6
Linux Mate
Google chrome and Firefox

rrogers

Eric Gourgoulhon

unread,
Jun 5, 2022, 11:51:00 AM6/5/22
to sage-support
Indeed, in Jupyter or Jupyterlab, the underscore is rendered as a minus sign in %display latex mode.
For instance,

%display latex
type(ZZ)

returns

<𝚌𝚕𝚊𝚜𝚜 '𝚜𝚊𝚐𝚎.𝚛𝚒𝚗𝚐𝚜.𝚒𝚗𝚝𝚎𝚐𝚎𝚛⎯𝚛𝚒𝚗𝚐.𝙸𝚗𝚝𝚎𝚐𝚎𝚛𝚁𝚒𝚗𝚐⎯𝚌𝚕𝚊𝚜𝚜'>

while

print(type(ZZ))

gives

<class 'sage.rings.integer_ring.IntegerRing_class'>

I don't know where the replacement of underscores by minus signs comes from...

Ray Rogers

unread,
Jun 5, 2022, 4:14:46 PM6/5/22
to sage-s...@googlegroups.com

Thanks for the pointer: 
%display plain
Clears it up, I just  have to (remember to) switch back and forth.

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/eed42bec-6f61-4280-8ccf-b244b6eb77een%40googlegroups.com.

Kwankyu

unread,
Jun 6, 2022, 6:58:47 AM6/6/22
to sage-support
It seems the bug is in jupyter. Try putting the following

$\verb|-_-|$

in a markdown cell.

Ray Rogers

unread,
Jun 6, 2022, 11:01:41 AM6/6/22
to sage-s...@googlegroups.com

It's strange that I see the output is temporarily correct and then gets replaced; you have to pay attention,  it's fast.  Like there is a censor/autocorrect kicking in after a write has taken plane.
Can I put ..verb.. in a code cell?  I am trying to troubleshoot/track results.

--
You received this message because you are subscribed to the Google Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.

William Stein

unread,
Jun 6, 2022, 11:58:11 AM6/6/22
to sage-support
On Mon, Jun 6, 2022 at 3:58 AM Kwankyu <ekwa...@gmail.com> wrote:
>
> It seems the bug is in jupyter. Try putting the following
>
> $\verb|-_-|$
>
> in a markdown cell.

I did some tests, and it also seems to me that this is a bug in
Jupyter classic and JupyterLab.

Incidentally, it's not a bug in my reimplementation of Jupyter in
CoCalc. I've reported this upstream:

https://github.com/jupyterlab/jupyterlab/issues/12657

William
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/e9f5d0d1-7097-46dd-83a0-64d0af35c699n%40googlegroups.com.



--
William (http://wstein.org)
Reply all
Reply to author
Forward
0 new messages