Question: How to turn off Typesetting:-Settings once set>

The command Typesetting:-Settings(prime=x,typesetprime=true):  makes diff(y(x),x) gives the latex as y'(x) which is what I wanted.

But I'd like to also be able to turn this off.  The reason is that in my program, I could have different variables in different places, and need to be able to turn this off/on as the program runs.

I know I can change the setting, by calling the above command again, with different variable. But I was looking for a way to turn it off as well. 

Similar to Typesetting:-Suppress  

Is there a way to do that? Actually the best solution would be, is to have the effect of Typesetting:-Settings(prime=x,typesetprime=true): be local to the proc. So if this command is used inside a proc, when leaving the proc, its effect will be automatically removed, as if this command was never issued.

Only when it is issued in global context, it will remain in effect until one does a restart.   Right now, the effect of Typesetting:-Settings(prime=x,typesetprime=true): is global. Even when called from inside a proc.  But this might be hard to implement. Therefore, being just able to turn it off is good for now.

Here is an example

restart;
foo:=proc(expr,x,y)
   Typesetting:-Settings(prime=x,typesetprime=true):
   print(Physics:-Latex(expr));

   #How to turn off the effect of above Typesetting command now?
   #so the following command works as the default setting?

   print(Physics:-Latex(expr));
end proc;


expr:=diff(y(x),x)=3:
foo(expr,x,y);

 

Please Wait...