setting font size for printed expressions

665 views
Skip to first unread message

qm

unread,
Nov 2, 2016, 3:22:07 PM11/2/16
to sympy
I'm trying to control the size of the printed output of an evaluation. I was hoping that the keyword argument 'fontsize' in function 'init_printing()' would do the job. But it does not seem to do so for me. At least trying two different types of IDEs, i.e. spyder and a jupyter notebook and starting up like this

from sympy import *

from __future__ import division

from sympy.abc import x,y,z

init_printing(use_latex=True,fontsize='12pt')


I am stuck with a single fixed font size for the result of

1+1

I can change the 12pt to whatever I like, the displayed font size remains the same.

i) should fontsize in the preceding be of relevance to the displayed font size at all?
ii) if yes, would you have any idea what could be wrong
iii) if no, then how to change the font size

Aaron Meurer

unread,
Nov 2, 2016, 3:28:10 PM11/2/16
to sy...@googlegroups.com
It looks like the fontsize option isn't working. I believe it should
only work for init_printing(use_latex='png'), but it's not even
working for that for me.

To scale MathJax math, you can right click it and choose "scale all
math". It may also be possible to do this programmatically in the
notebook.

Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/ffba6c3c-fc65-4a12-8d03-5cc0a30d5c78%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

qm

unread,
Nov 2, 2016, 4:32:16 PM11/2/16
to sympy
To scale MathJax math, you can right click it and choose "scale all
math". It may also be possible to do this programmatically in the
notebook.

That workaround surely works in Jupyter notebooks, which treat MathJax nicely.

However, I cannot get it to work with spyder. This may or may not be an issue with spyder. It claims to have MathJax rendering 'somehow', if you click an option in its preferences, but I don't see no MathJax rendered output when typing 1+1 in spyder ... anyway that's off topic here.
Reply all
Reply to author
Forward
0 new messages