Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problems with AMS symbols in Sage, Jupyter

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)