Closed corlick98 closed 2 years ago
<if>
<condition test="is(roots(p)=5)">--if
something
</condition>
<condition test="is(roots(p)=4)">--else if
something
</condition>
<condition test="true">--else
something
</condition>
</if>
Confirmed: This is working!
Is your feature request related to a problem? Please describe. Interest was expressed in being able to render parts of the question text only if a condition is met. For example: you have variables a and b that can be positive or negative and you want to render
an+b
without conditional rendering the current system will display this as3n+-5
if b is negative. Being able to control whether the+
is rendered based on the value of b would help this issue.Describe alternatives you've considered When using maxima you can set
g: a*n+b
and it will render correctly most of the time unless b is positive and a is negative where it will render as3 - 9n
Additional context A possible structure for the xml is described here https://stackoverflow.com/questions/6061470/if-then-else-using-xml