The last instruction below never returns because the latex compilation contains an error which reads : "! Missing $ inserted."
(latex wants a user input to run uninterrupted)
latex does not complain.esplatex standalone works fine, see test file and run with gnuplot test-axis.gnuplotsystem: Debian Trixie
maxima: 5.47.0-7
wxmaxima: 24.02.1-1+b2
gnuplot-qt: 6.0.2+dfsg1-1
wxbug_report()
wxMaxima version: 24.02.1_GTK3
using wxWidgets version: wxWidgets 3.2.4
Maxima version: 5.47.0
Maxima build date: 2025-04-26 23:41:25
Host type: x86_64-pc-linux-gnu
System type: NIL NIL NIL
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.7.1 git tag Version_2_7_2ore2
Test code:
f(q):=1000000+125000/q+10*q$
filename:"test"$
yscale:1$ /* y = 1 : no y scaling */
scene:gr2d(
explicit(f(Q)/yscale,Q,1,200),
xlabel="$q$",ylabel="$f(q)$"
)$
draw(scene)$
draw(terminal=epslatex_standalone,
dimensions=[1600,1200],
file_name=filename, scene);
/*
Instead, choose above yscale:1000000$ and everything works fine
*/
system(concat("latex ",filename), " > /dev/null ");
Looking at the LaTeX output, I see lines which look like
and the stuff after
\strut{}needs to be enclosed in dollar signs. Indeed, if I put dollar signs around the\timesstuff, thenlatexruns without error and creates what appears to be a valid output.I think this is a bug in the LaTeX output for Gnuplot. I have version 5.0 installed on my system. Hmm, I see you have Gnuplot 6.0.2, so it appears the putative bug is still there; the most recent version is 6.0.4, just a little later. I have opened a bug report for Gnuplot: https://sourceforge.net/p/gnuplot/bugs/2861/
As this appears to be a bug in Gnuplot, I'll close this bug report.
Looking at the LaTeX output, I see lines which look like
and the stuff after
\strut{}needs to be enclosed in dollar signs. Indeed, if I put dollar signs around the\timesstuff, thenlatexruns without error and creates what appears to be a valid output.I think this is a bug in the LaTeX output for Gnuplot. I have version 5.0 installed on my system. Hmm, I see you have Gnuplot 6.0.2, so it appears the putative bug is still there; the most recent version is 6.0.4, just a little later. I have opened a bug report for Gnuplot: https://sourceforge.net/p/gnuplot/bugs/2861/
As this appears to be a bug in Gnuplot, I'll close this bug report.
I've reopened this ticket, it turns out the problem is in the code which generates the Gnuplot script -- it has to do with the non-default tic label. I'll try to fix the bug in the
drawpackage, but in the meantime, you can patch your copy of Maxima by cutting outset format '%h'inshare/draw/gnuplot.lisp.Fixed by commit [ ce4e05a ]. I just removed
set format '%h'so that the default tick format is applied by Gnuplot, which is$%h$for LaTeX terminals and% hfor all others.% hand%hare almost the same; the only difference is that% hputs a space before positive numbers. I don't think that matters. It's not clear why%hwas put into thedrawcode; maybe the default was something else at the time.Thank you very much :-)