Overview

Working with MUMIE as author

Working with MUMIE as teacher

Go back to the old wiki

We revise and update this wiki. We apologize for the inconvenience this may cause you.

# Visualization If and Else

In the \text command you can use \IF{condition}{text} and \IFELSE{condition}{text}{othertext} to write text which will only be visible if a certain condition holds.

It's possible to ask for two conditions by combining them with the command AND: \IF{condition1 AND condition2}{text}

12345678\begin{genericVisualization}[100prc][600]{applet}\begin{variables}  \number[editable]{a}{real}{1}  \number[editable]{b}{real}{2}  \number{adivb}{real}{var(a)/var(b)}\end{variables}...\text{\IFELSE{b=0}{\infinity}{\var{adivb}}} 

The condition can be a logical composition of elementary conditions:

123456789101112131415\usepackage{mumie.genericvisualization} \lang{de}{\title{Titel}} \lang{de}{Freier Text} \begin{visualizationwrapper}\begin{genericVisualization}[100prc][900]{applet}  \begin{variables}    \randint{a}{-5}{5}  \end{variables}\text{\IFELSE{var(a)>0 AND var(a)<0}{Ist wahr}{Es ist nicht wahr }} \end{genericVisualization}\end{visualizationwrapper} 

The syntax used for condition is similar to the condition syntax of \randadjustIf.

It is also possible to combine multiple \IFELSE as in the following example

1234567891011121314151617181920\begin{genericVisualization}[100prc][600]{applet}\begin{variables}  \number[editable]{a1}{real}{1}  \number[editable]{b1}{real}{2}  \number[editable]{c1}{real}{3}  \number[editable]{a2}{real}{4}  \number[editable]{b2}{real}{5}  \number[editable]{c2}{real}{6}\end{variables}...\text[c]{\begin{align}\var{a1}x &+& \var{b1}y &=& \var{c1}\\\var{a2}x &+& \var{b2}y &=& \var{c2} \end{align}} % display linear equation system\text[c]{  \IFELSE{(a1/a2) = (b1/b2)}  {     \IFELSE{(a1/a2) = (c1/c2)}     {The above equation system has infinite number of solutions.}     {The above equation system has no solution.}  }  {The above equation system has exactly one solution.}}