Ask Your Question
2

Automatic typesetting in Jupyter

asked 2015-12-20 06:18:13 -0600

marmistrz gravatar image

updated 2015-12-23 13:21:28 -0600

When using the Jupyter notebook I always have to type

%display typeset

as my first line so as to enable typesetting.

Is there any way to avoid it and have the answers typeset automatically?

I'm using sagemath-upstream-binary from the PPA and Linux Mint 17.3 Cinnamon.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-28 02:18:32 -0600

Use the init.sage file and include this line in that file:

pretty_print_default(True)

See the section about 'init.sage' on this page:

http://doc.sagemath.org/html/en/refer...

edit flag offensive delete link more
0

answered 2015-12-22 16:38:16 -0600

calc314 gravatar image

Your question does not specify whether you are using SageMath Cloud or just an standalone version of Jupyter.

In Sage Math Cloud, the typesetting appears to be set to default to use MathJax.

Otherwise, you need to get to a terminal and type jupyter notebook --generate-config to generate the configuration file jupyter_notebook_config.py. Then, edit this file and uncomment the following line:

# c.NotebookApp.enable_mathjax = True

This should change the defaults as far as I can tell. Unfortunately, I'm not set up to test this at the moment.

edit flag offensive delete link more

Comments

I have this line in /usr/lib/sagemath/local/etc/jupyter_notebook_config.py but I still need to use %display typeset

marmistrz gravatar imagemarmistrz ( 2015-12-23 13:20:47 -0600 )edit

Is it uncommented?

Also, are you running your own stand-alone version of Sage Math Cloud, or if not, what is your configuration?

Finally, can you add an example to your original question of code that should produce typeset output but doesn't?

I will take another look at it.

calc314 gravatar imagecalc314 ( 2015-12-24 14:13:35 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-12-20 06:18:13 -0600

Seen: 624 times

Last updated: Dec 28 '15