mirror of
https://github.com/moodle/moodle.git
synced 2025-01-22 16:18:24 +01:00
Now strips outermost parentheses in denominators
This commit is contained in:
parent
d956341c66
commit
65a275f404
@ -107,6 +107,7 @@ function refineTeX($texexp) {
|
||||
$texexp = str_replace('\mbox{asech}','\mbox{sech}^{-1}',$texexp);
|
||||
$texexp = str_replace('\mbox{acsch}','\mbox{csch}^{-1}',$texexp);
|
||||
$texexp = str_replace('\mbox{acoth}','\mbox{coth}^{-1}',$texexp);
|
||||
$texexp = preg_replace('/\\\frac{(.+?)}{\\\left\((.+?)\\\right\)}/s','\frac{'."\$1}{\$2}",$texexp);
|
||||
$texexp = preg_replace('/\\\sqrt{(.+?),(.+?)}/s','\sqrt['. "\$2]{\$1}",$texexp);
|
||||
$texexp = preg_replace('/\\\mbox{abs}\\\left\((.+?)\\\right\)/s',"|\$1|",$texexp);
|
||||
$texexp = preg_replace('/\\\log\\\left\((.+?),(.+?)\\\right\)/s','\log_{'. "\$2}\\left(\$1\\right)",$texexp);
|
||||
|
@ -170,6 +170,7 @@ function algebra_filter ($courseid, $text) {
|
||||
$texexp = str_replace('\mbox{asech}','\mbox{sech}^{-1}',$texexp);
|
||||
$texexp = str_replace('\mbox{acsch}','\mbox{csch}^{-1}',$texexp);
|
||||
$texexp = str_replace('\mbox{acoth}','\mbox{coth}^{-1}',$texexp);
|
||||
$texexp = preg_replace('/\\\frac{(.+?)}{\\\left\((.+?)\\\right\)}/s','\frac{'."\$1}{\$2}",$texexp);
|
||||
$texexp = preg_replace('/\\\sqrt{(.+?),(.+?)}/s','\sqrt['. "\$2]{\$1}",$texexp);
|
||||
$texexp = preg_replace('/\\\mbox{abs}\\\left\((.+?)\\\right\)/s',"|\$1|",$texexp);
|
||||
$texexp = preg_replace('/\\\log\\\left\((.+?),(.+?)\\\right\)/s','\log_{'. "\$2}\\left(\$1\\right)",$texexp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user