You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While analyzing a sagetex autopkgtest issue in Debian when the sagemath package removed its dependency to python-tk, I found that sagetex required python-tk to generate graph with \sageplot.
Actually, I found in matplotlib usage FAQ that matplotlib can use many different backends.
There are rendering backends and interactive backends. Cairo is a rendering backend for example, and TK is an interactive one.
The default used backend is chosen according to different things (configuration file, environment variable, python function call).
Actually, sagetex is using the default backend which is TkAgg and so require python-tk when doing \sageplot.
I don't think sagetex actually require an interactive backend, but just something that can generate a pdf, eps of image file is enough.
So a rendering backend could be enough for sagetex.
Also, sagetex should not depend on user configuration of matplotlib as it seems the case (I've not checked myself but just read matplotlib docs, so it might be different)
So I suggest that sagetex:
Depend on a specific rendering backend like cairo that does all required formats (eps, pdf, png and probably formats provided by users)
Use matplotlib.use('cairo') (or another backend) so only a known working backend is used and not whatever the user configured.
According to matplotlib usage FAQ, cairo is the only one to support multiple formats including eps, pdf and png.
Hi,
While analyzing a sagetex autopkgtest issue in Debian when the sagemath package removed its dependency to python-tk, I found that sagetex required python-tk to generate graph with
\sageplot
.Actually, I found in matplotlib usage FAQ that matplotlib can use many different backends.
There are rendering backends and interactive backends. Cairo is a rendering backend for example, and TK is an interactive one.
The default used backend is chosen according to different things (configuration file, environment variable, python function call).
Actually, sagetex is using the default backend which is TkAgg and so require python-tk when doing
\sageplot
.I don't think sagetex actually require an interactive backend, but just something that can generate a pdf, eps of image file is enough.
So a rendering backend could be enough for sagetex.
Also, sagetex should not depend on user configuration of matplotlib as it seems the case (I've not checked myself but just read matplotlib docs, so it might be different)
So I suggest that sagetex:
According to matplotlib usage FAQ, cairo is the only one to support multiple formats including eps, pdf and png.
Here is the Debian bug for reference: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921120
The text was updated successfully, but these errors were encountered: