Question: How to use Typesetting:-Settings(prime=x,typesetprime=true); after calling Latex?

There might be a setting for this. I do not know.

I  noticed, once I call Latex() first time, if I then later issue Typesetting:-Settings(prime=x,typesetprime=true); and after that, call Latex() again, it has no effect.  The derivative does not change.

But calling Typesetting:-Settings(prime=x,typesetprime=true); before calling Latex() the first time, works.

Since I do not want to do restart() in a running program, and I would like to call Typesetting:-Settings(prime=x,typesetprime=true); may be different times to change the letter and after having called Latex earlier, is there a way to make this work without having to do restart? I do not rememebr now if this was the case in earlier version or not. I looked at Latex:-Settings() and see no setting for this inside Latex itself to use in place of the above global Settings.

Please see worksheet below.


 

interface(version);

`Standard Worksheet Interface, Maple 2020.2, Windows 10, November 11 2020 Build ID 1502365`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 879 and is the same as the version installed in this computer, created 2020, November 19, 20:10 hours Pacific Time.`

restart;
Latex:-Settings(UseImaginaryUnit=i,
      UseColor = false,
      powersoftrigonometricfunctions= computernotation,
      leavespaceafterfunctionname = true
):
ode:=2*diff(y(x),x)*x=(1+x-6*y(x)^2)*y(x):
#This works, since setting is called BEFORE calling Latex first time
Typesetting:-Settings(prime=x,typesetprime=true):
ode;
Latex(ode)

2*(diff(y(x), x))*x = (1+x-6*y(x)^2)*y(x)

2 y^{\prime}\left(x \right) x =
\left(1+x -6 y \left(x \right)^{2}\right) y \left(x \right)

restart;
Latex:-Settings(UseImaginaryUnit=i,
      UseColor = false,
      powersoftrigonometricfunctions= computernotation,
      leavespaceafterfunctionname = true
):
ode:=2*diff(y(x),x)*x=(1+x-6*y(x)^2)*y(x);
Latex(ode);

#This does not work, since setting is called AFTER calling Latex.
#The latex generated remains the same.
 
Typesetting:-Settings(prime=x,typesetprime=true);
ode;
Latex(ode)

2*(diff(y(x), x))*x = (1+x-6*y(x)^2)*y(x)

2 \left(\frac{d}{d x}y \left(x \right)\right) x =
\left(1+x -6 y \left(x \right)^{2}\right) y \left(x \right)

x, false

2*(diff(y(x), x))*x = (1+x-6*y(x)^2)*y(x)

2 \left(\frac{d}{d x}y \left(x \right)\right) x =
\left(1+x -6 y \left(x \right)^{2}\right) y \left(x \right)

 

 

Download how_to_change_setting.mw

 

 

Please Wait...