How to wrap the output or magnify it?

I am using Sagemath with JupyterLab-Desktop or Jupyter/JupyterLab notebook in the browser.

As you can see in the picture, The inverse of the matrix is too small, and the output of the expand() doesn’t wrap. you have to use the horizontal scroll:

anyways to fix these?

Have your tried increasing your browser’s Zoom settings to see if the inverse of the matrix will be larger for you?
You only included a screenshot and so it isn’t easy to test.
Similar thing with the wrapping. I have some ideas, such as perhaps adjusting line wrapping, but I cannot test since you don’t include the code. Although I don’t know if Sagemath also exposes the full range of customization current Jupyter offers?

And there is an ask sagemath Forum where you may get more pertinent information perhaps?

Inverse of the matrix:

a,b,c,d,e,f,g,h,i = var('a b c d e f g h i')
A = matrix([[a,b,c],[d,e,f],[g,h,i]])
show(A.inverse())

The expand() function:

show(expand((a+b+c)^20))

you could zoom-in if you run Sagemath’s Jupyterlab notebook in a web browser. The desktop JupyterLab app does not have this function?

On CoCalc’s Jupyter Notebook, the output wraps.

You should be able to use it in the Desktop version, too. See here. If some of the offered shortcuts don’t work, a workaround is suggested that lets you alter settings for it.


The code you provided is not a minimal, reproducible example so I still cannot try. See Getting good answers to your questions . You can easily test what others that don’t work on the same code as you will face by going here and pressing ‘launch binder’ to get a generic Jupyter session in your browser. I assume I’d need to run %pip install sagemath-standard but beyond that I don’t know Sagemath as well as your code assumes.