The function "view(" doesn't seem to work with jupyter notebook
I'm sorry if the question was already answered somewhere, but I did not find out an answer by myself:
In the "old" sagemath notebooks, there was a function "view" to display latex that MathJax cannot display. For instance the sage documentation proposes the following:
from sage.graphs.graph_latex import setup_latex_preamble
setup_latex_preamble()
latex.engine('pdflatex')
latex.add_to_mathjax_avoid_list('tikzpicture')
view(graphs.CompleteGraph(4))
- In the "old" sage notebook, this produces a png version of a graph (compiled from latex), which is inserted into the output of the cell
- In the Jupyter netbook, by contrast, it opens a pdf version of the graph into an external window.
Is there some way to obtain, in the Jupyter notebook, the same behaviour as in the "old netbook" ?
Thanks
Actually, the example
graphs.CompleteGraph(4)
is a bad example because pretty_print already does what I wish, for this example (it is the example that was in the documentation of sage).But the question remains with, for instance
view(Tableau([[1,2],[3]]))
, for which pretty_print doesn't work (due to limitation of MathJax with respect to tables).But if someone is able to explain to me how
pretty_print(graphs.CompleteGraph(4))
works, that will already be something (it displays more than whatlatex(graphs.CompleteGraph(4))
has).