Question: Latex command fails in command line in Maple 2024

Just found very serious problem.

Was trying my code in command line maple (cmaple.exe) only to find latex() command fails now.

Same code works with no problem in worksheet.  Here is first the worksheet version.
 

33308

restart;

33308

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode:=diff(y(x),x)=x;
try
    s:=latex(ode,'output'=string):
    print("Latex command worked on ode");
catch:
    error lastexception;
end try:


the_output:=Student:-ODEs:-ODESteps(ode,y(x)):
try
    s:=latex(the_output,'output'=string):
    print("Latex command worked");
catch:
    error lastexception;
end try:

diff(y(x), x) = x

"Latex command worked on ode"

"Latex command worked"

 


 

Download worksheet_version_latex_OK_june_21_2024.mw

Now I do same thing but from command line. I put the above code in A.mpl file in some folder on windows:

ode:=diff(y(x),x)=x;
try
    s:=latex(ode,'output'=string):
    print("Latex command worked on ode");
catch:
    error lastexception;
end try:


the_output:=Student:-ODEs:-ODESteps(ode,y(x)):
try
    s:=latex(the_output,'output'=string):
    print("Latex command worked");
catch:
    error lastexception;
end try:

 

Then opened a command windows terminal and cd to the above folder and typed this command

"C:\Program Files\Maple 2024\bin.X86_64_WINDOWS\cmaple.exe"  -q A.mpl

And this is what happens. Latex works OK on generating latex for the ode, but not for the steps!It gives error

 

Error, latex, invalid input: %1 uses a %-2 argument, %3 (of type %4), which is missing, latex:-ModuleApply, 1, e, anything

Also I was not able to suppress the display of the odesteps on the terminal even though they do not display in worksheet, they still print in the terminal. But this is a side issue.

Why does Latex gives error in command line? 

I think it is related to those funny looking characters (bullets?) signs at the start of each ODE step that show in the terminal? 

But in worksheet latex has no problem converting the ODE steps to Latex. It is only in cmaple. 

Is there a way to correct this? It seems to be some character encoding is causing the problem for Latex on command line vs. worksheet.

 

Windows 10, Maple 2024

 

 

 

Please Wait...