Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error message tels you quite clearly that you need a local LaTeX installation.

Try installing one locally (on Linux and Windows, TeXLive seems to be the most easly installable and the most up to date distribution...).

The tutorial has some (somewhat outdated IMHO)advice for this.

Why you are at it, drop a look to SageTeX, a nice system allowing the creation of "active LaTeX documents" allowing to ensure consistency of text and Sage code.

HTH,

The error message tels you quite clearly that you need a local LaTeX installation.

Try installing one locally (on Linux and Windows, TeXLive seems to be the most easly installable and the most up to date distribution...).

The tutorial has some (somewhat outdated IMHO)advice for this.

Why you are at it, drop a look to SageTeX, a nice system allowing the creation of "active LaTeX documents" allowing to ensure consistency of text and Sage code.

EDIT : The beginning of latex(s) is a helpful command stating :

%% Creator: Matplotlib, PGF backend
%%
%% To include the figure in your LaTeX document, write
%%   \input{<filename>.pgf}
%%
%% Make sure the required packages are loaded in your preamble
%%   \usepackage{pgf}
%%
%% Also ensure that all the required font packages are loaded; for instance,
%% the lmodern package is sometimes necessary when using math font.
%%   \usepackage{lmodern}
%%
%% Figures using additional raster images can only be included by \input if
%% they are in the same directory as the main LaTeX file. For loading figures
%% from other directories you can use the `import` package
%%   \usepackage{import}
%%
%% and then include the figures with
%%   \import{<path to file>}{<filename>.pgf}
%%
%% Matplotlib used the following preamble
%%   \usepackage{fontspec}
%%   \setmainfont{DejaVuSerif.ttf}[Path=\detokenize{/usr/local/sage-9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf/}]
%%   \setsansfont{DejaVuSans.ttf}[Path=\detokenize{/usr/local/sage-9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf/}]
%%   \setmonofont{DejaVuSansMono.ttf}[Path=\detokenize{/usr/local/sage-9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf/}]
%%

Therefore, not only you must have {pdf|xe|lua}latex somewhere in your path, you must also have the pgf LaTeX package (and its dependencies) installed in your LaTeX installation.

FWIW, works like clockwork for me on 9.8.beta3 running on Debian testingwhere the Deboian package texlive-full is installed (tis is ildly overshoot for Sage's needs, but I have other uses for LaTeX...).

HTH,

The error message tels you quite clearly that you need a local LaTeX installation.

Try installing one locally (on Linux and Windows, TeXLive seems to be the most easly installable and the most up to date distribution...).

The tutorial has some (somewhat outdated IMHO)advice for this.

Why you are at it, drop a look to SageTeX, a nice system allowing the creation of "active LaTeX documents" allowing to ensure consistency of text and Sage code.

EDIT : The beginning of latex(s) is a helpful command stating :

%% Creator: Matplotlib, PGF backend
%%
%% To include the figure in your LaTeX document, write
%%   \input{<filename>.pgf}
%%
%% Make sure the required packages are loaded in your preamble
%%   \usepackage{pgf}
%%
%% Also ensure that all the required font packages are loaded; for instance,
%% the lmodern package is sometimes necessary when using math font.
%%   \usepackage{lmodern}
%%
%% Figures using additional raster images can only be included by \input if
%% they are in the same directory as the main LaTeX file. For loading figures
%% from other directories you can use the `import` package
%%   \usepackage{import}
%%
%% and then include the figures with
%%   \import{<path to file>}{<filename>.pgf}
%%
%% Matplotlib used the following preamble
%%   \usepackage{fontspec}
%%   \setmainfont{DejaVuSerif.ttf}[Path=\detokenize{/usr/local/sage-9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf/}]
%%   \setsansfont{DejaVuSans.ttf}[Path=\detokenize{/usr/local/sage-9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf/}]
%%   \setmonofont{DejaVuSansMono.ttf}[Path=\detokenize{/usr/local/sage-9/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/matplotlib/mpl-data/fonts/ttf/}]
%%

Therefore, not only you must have {pdf|xe|lua}latex somewhere in your path, you must also have the pgf LaTeX package (and its dependencies) installed in your LaTeX installation.

FWIW, works like clockwork for me on 9.8.beta3 running on Debian testingwhere the Deboian testing where the Debian package texlive-full is installed (tis (this is ildly wildly overshoot for Sage's needs, but I have other uses for LaTeX...).

HTH,