// bug found by Serge Barral: what happens if we have curly braces only (typically to ensure case in Latex)
// bug found by Serge Barral: what happens if we have curly braces only (typically to ensure case in Latex)
// added && strpos($line,'{')===false
// added && strpos($line,'{')===false
@ -1016,6 +1019,7 @@ function latex2html($line) {
// " the letters "i" and "j" require special treatment when they are given accents because it is often desirable to replace the dot with the accent. For this purpose, the commands \i and \j can be used to produce dotless letters."
// " the letters "i" and "j" require special treatment when they are given accents because it is often desirable to replace the dot with the accent. For this purpose, the commands \i and \j can be used to produce dotless letters."
$line=preg_replace('/\\\\([ij])/i','\\1',$line);
$line=preg_replace('/\\\\([ij])/i','\\1',$line);
$line=char2html($line,"'",'a',"acute");
$line=char2html($line,"'",'a',"acute");
$line=char2html($line,"'",'e',"acute");
$line=char2html($line,"'",'e',"acute");
$line=char2html($line,"'",'i',"acute");
$line=char2html($line,"'",'i',"acute");
@ -1066,6 +1070,7 @@ function latex2html($line) {
$line=str_replace('\\k{a}','ą',$line);
$line=str_replace('\\k{a}','ą',$line);
$line=str_replace('\\\'{c}','ć',$line);
$line=str_replace('\\\'{c}','ć',$line);
// clean extra tex curly brackets, usually used for preserving capitals
// clean extra tex curly brackets, usually used for preserving capitals