Problems with AMS symbols in Sage, Jupyter [closed]

asked 2019-10-12 16:39:14 +0200

SYLA gravatar image

How to display the square (\square) symbol in a graph (Jupyter, maybe not only). Why \boxtimes is too large?

plot(x, (x,-1,10), axes_labels=[r'$F(G\,\square\,H)$',r'$F(G\,\times\,H)$']).show()

plot(x, (x,-1,10), axes_labels=[r'$F(G\,\square\,H)$',r'$F(G\,\times\,H)$']).show()

I tried \box \square \emptybox etc. and

from sage.misc.latex import latex_extra_preamble
latex.add_to_preamble('\\usepackage{amssymb}')

I get:

ValueError: F(G\,\square\,H) ^ Unknown symbol: \square (at char 5), (line:1, col:6)

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by tmonteil
close date 2019-10-12 16:45:39.578829