STACK Strange LaTeX rendering behaviour

STACK Strange LaTeX rendering behaviour

autor Hugh Dickinson -
Počet odpovedí: 2
I am encountering a strange behaviour in STACK. I have an expression expr that renders as:
(1/2)-(3/7)
in CAStext when I use {#expr#} (which is what I expect) but appears as
A LaTeX rendering of minus 1 divided by 2
when I use {@expr@}. Is this known/expected behaviour? Any ideas for how to get the LaTeX rendering to work correctly?

Many thanks,

Hugh
Priemer hodnotení : -
V odpovedi na Hugh Dickinson

Re: STACK Strange LaTeX rendering behaviour

autor Hugh Dickinson -
Apologies for clogging up the forum. I have solved this. It turned out to be related to the detailed way that expr was constructed. Specifically, I had used nested calls to apply with operator names like "*" and "-" as the first argument. I had not spotted that Maxima does not understand - as a binary operation, which led to the strange behaviour when trying to evaluate the expression and convert to LaTeX.
V odpovedi na Hugh Dickinson

Re: STACK Strange LaTeX rendering behaviour

autor Christopher Sangwin -
Obrázok: Particularly helpful Moodlers Obrázok: Plugin developers
Please don't worry Hugh.  Minus, and the difference between binary a-b and unary -b is the bane of my life!  It's a subtle issue in CAS when we are dealing with elementary expressions without simplification.  If an example in the STACK docs would have helped you, please send me some text and I'll gladly add it.