[LON-CAPA-users] Algebra Expression Rendering in LON-CAPA
Damien Guillaume
damieng at msu.edu
Fri Jan 13 22:16:52 EST 2017
> This is the call from the xml to render it:
>
> <center> <algebra>$function</algebra></center>
The algebra element has its own syntax. I do not know if it is
documented, but we can look at the code at
http://source.lon-capa.org/cgi-bin/cvsweb.cgi/loncom/xml/algebra/AlgParser.pm?rev=1.18
The regular expressions used to recognized functions are:
my $trigfname = '(?:(?:a(?:rc)?)?(?:sin|cos|tan|sec|csc|cot)h?)';
my $otherfunc =
'(?:exp|abs|logten|log|ln|sqrt|sgn|step|fact|int|lim|fun[a-zA-Z])';
There is no sum. To display a sum, you could use the TeX syntax as Gerd
suggested, within <m>$ $</m>.
Damien
More information about the LON-CAPA-users
mailing list