
<h3>How to write mathematical formulas in your exercises.</h3>

You may embed mathematical symbols and formulas into the statement (when it
is of html format), hint and solution.
<p>
If you simply want to insert some mathematical symbols or greek letters,
you just need to type a <span class="tt wims_code_words">\</span> followed by the name of
the symbol or greek letter (if you have not used this name in your parameter
definitions). For example, <span class="tt wims_code_variable">\pi</span> gives you $m_pi,
<span class="tt wims_code_variable">\le</span> gives $m_le, <span class="tt wims_code_variable">\pm</span> gives $m_pm, <span class="tt wims_code_variable">\rightarrow</span> gives
$m_rightarrow, etc. The names of the symbols follow the standard TeX
convention. Here is a
!href target=wims_help module=help/wimsdoc.en&subject=mathfonts#mathfonts list of mathematical symbols and their names
 (replace <span class="tt wims_code_words">$$m_</span> by <span class="tt wims_code_words">\</span> in the names).
</p><p>
More generally, to insert a whole mathematical formula, you
can type the formula in the usual way as if you enter it into any
mathematical software or any computational tool under WIMS. In order to make
the formula formatted and shown beautifully, you have
only to enclose it in a pair of parentheses preceded by a backslash \. For
example, <span class="tt wims_code_words">\(x^3-3x+cos(2pi*x)^5\)</span> gives you
!insmath x^3-3*x+cos(2pi*x)^5
, or <span class="tt wims_code_words">\(sqrt(x^2+y^2)\)</span> gives you
!insmath sqrt(x^2+y^2)
. You can type <span class="tt wims_code_words">\(integrate(x^2+1)dx\)</span> for
!insmath integrate(x^2+1)*dx
, or <span class="tt wims_code_words">\(integrate(exp(x^2+1),x=1..infinity)\)</span> for
!insmath integrate(exp(x^2+1),x=1..infinity)
. You can also write the sum
!insmath sum(1/n^2,n=1..infinity)
 using <span class="tt wims_code_words">\(sum(1/n^2,n=1..infinity)\)</span>, or the product
!insmath product(n/(n+1),n=1..infinity)
 using <span class="tt wims_code_words">\(product(n/(n+1),n=1..infinity)\)</span>.
</p><p>
More helps on how to enter mathematical expressions are in 
!href target=wims_help module=help/main&chapter=1&open=1_math#math this page
.
</p><p>
To show a matrix
!insmath [1,2,3;4,5,6;7,8,9]
, you should type <span class="tt wims_code_words">\([1,2,3;4,5,6;7,8,9]\)</span>. Nested matrices are
accepted (and will be rendered correctly).
<p>
For experts in TeX or LaTeX, please notice that whenever the software sees a formula
enclosed in a pair of parentheses preceded by <span class="tt wims_code_words">\</span> which contains 
backslashes, it will interpret it as a TeX source, and will directly try to 
format it by TeX. This will allow you to write very sophisticated formulas if
you know how to write them in the TeX way.
TeX ou LaTeX, you can write inside the parentheses <span class="tt wims_code_words">\displaystyle</span> or 
an empty pair of braces <span class="tt wims_code_words">{}</span>.
For example, you will get &nbsp; 
!insmath \displaystyle a
&nbsp;  &nbsp; via <span class="tt wims_code_words">\(\displaystyle a \)</span>
or <span class="tt wims_code_words">\({} a \)</span>
and &nbsp;
!insmath a 
&nbsp;  &nbsp; via <span class="tt wims_code_words">\( a \)</span>.

</p><p>
And the most complete way to use TeX in your exercise is to choose
!href cmd=help&special_parm=format TeX format
 (for the statement only).
</p>
