text is not render correctly after apostrophe, its not problem of mimetex but problem of math filter
Can you point me at a page where I can see this in action? Unfortunately I don't have enough information to properly debug this problem.
Dave
if you type [tex]f'(x)[/tex] you will get "f". You must type [tex]f%27(x)[/tex] to get f'(x) correctly
Okay, looks like I need to include urlencode() in the function. I'll do some testing, this may be a relatively easy fix.
If you change:
$text = substr_replace($text, "<img src='".$mimetex_cgi_path_http."?".$mimetex_formula."' title='".$alt_mimetex_formula."' alt='".$alt_mimetex_formula."' style=\"vertical-align: middle;\" >",$pos,strlen($tex_matches[0][$i]));
to
$text = substr_replace($text, "<img src='".$mimetex_cgi_path_http."?".urlencode(str_replace(' ', '', $mimetex_formula))."' title='".$alt_mimetex_formula."' alt='".$alt_mimetex_formula."' style=\"vertical-align: middle;\" >",$pos,strlen($tex_matches[0][$i]));
then this problem should be fixed, or at least it is on my server.
Comments
Comment #1
dwees commentedCan you point me at a page where I can see this in action? Unfortunately I don't have enough information to properly debug this problem.
Dave
Comment #2
redolent@life.math.ntu.edu.tw commentedif you type [tex]f'(x)[/tex] you will get "f". You must type [tex]f%27(x)[/tex] to get f'(x) correctly
Comment #3
dwees commentedOkay, looks like I need to include urlencode() in the function. I'll do some testing, this may be a relatively easy fix.
Dave
Comment #4
dwees commentedIf you change:
to
then this problem should be fixed, or at least it is on my server.
Dave