Hello,
Some teachers would like to use tex notation on our Moodle platform to make it easier to create their courses, as they already use LaTeX outside of Moodle.
However, the preamble of LaTeX doesn't seem to be taken into account, the problem seems to come from /usr/bin/convert but we can't find the cause of the problem.
I installed texlive-full and imagemagick. All paths are correct.
Here is our preamble:
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{stmaryrd}
\usepackage{amssymb}
%\usepackage{latexsym}
%\RequirePackage{amsmath,amssymb,latexsym}
\newcommand{\N}{\mathbb{N}}
Using the Tex Filter Debugger, we get the following results for each test :
1 -
DB cache_filters entry for f(x)=\int_{-\infty}^x~e^{-t^2}dt not found
3 -
sh: 1: /var/www/moodle/filter/tex/mimetex.linux: not found The shell command
"/var/www/moodle/filter/tex/mimetex.linux" -e "/var/www/moodledata/filter/tex/9608176195573c30c6beb3cf078fdf66.gif" -- '\Large f(x)=\int_{-\infty}^x~e^{-t^2}dt'
returned status = 127
File size of mimetex executable /var/www/moodle/filter/tex/mimetex.linux is 1317676
The file permissions are: 100755
The md5 checksum of the file is be9326dfd98c19c55b37beb1acc132c7
Image not found!
No text output available
4-
Error creating image, see command execution output for more details.
5-
Checking executables
latex executable (/usr/bin/latex) is readabledvips executable (/usr/bin/dvips) is readable
convert executable (/usr/bin/convert) is readable
dvisvgm executable (/usr/bin/dvisvgm) is readable
base filename for expression is '9608176195573c30c6beb3cf078fdf66'
Processing TeX expression:
f(x)=\int_{-\infty}^x~e^{-t^2}dt
$ '/usr/bin/latex' --interaction=nonstopmode --halt-on-error /var/www/moodledata/temp/latex/9608176195573c30c6beb3cf078fdf66.tex OUTPUT: This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=latex) restricted \write18 enabled. entering extended mode (/var/www/moodledata/temp/latex/9608176195573c30c6beb3cf078fdf66.tex LaTeX2e <2018-12-01> (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls Document Class: article 2018/09/03 v1.4i Standard LaTeX document class (/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty For additional information on amsmath, use the `?' option. (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty)) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty)) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty) (/usr/share/texlive/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty) (./9608176195573c30c6beb3cf078fdf66.aux) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd) (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd) (/usr/share/texlive/texmf-dist/tex/latex/stmaryrd/Ustmry.fd) [1] (./9608176195573c30c6beb3cf078fdf66.aux) ) Output written on 9608176195573c30c6beb3cf078fdf66.dvi (1 page, 496 bytes). Transcript written on 9608176195573c30c6beb3cf078fdf66.log. RETURN CODE: 0
$ '/usr/bin/dvips' -E /var/www/moodledata/temp/latex/9608176195573c30c6beb3cf078fdf66.dvi -o /var/www/moodledata/temp/latex/9608176195573c30c6beb3cf078fdf66.ps OUTPUT: RETURN CODE: 0
$ '/usr/bin/convert' -density 240 -trim /var/www/moodledata/temp/latex/9608176195573c30c6beb3cf078fdf66.ps /var/www/moodledata/temp/latex/9608176195573c30c6beb3cf078fdf66.gif OUTPUT: RETURN CODE: 1
So the problem seems to come from convert ... (/etc/ImageMagick-6/policy.xml seems to be well set up though) . And in similar cases in 2004-2006, it was related to safe_mode=on, but this has become obsolete nowadays...
Does anyone know the cause of the problem and how to solve it?
Cordially,
Arnaud Taburet