diff --git a/macros/PGbasicmacros.pl b/macros/PGbasicmacros.pl index 37d1f66af4..cb767c752e 100644 --- a/macros/PGbasicmacros.pl +++ b/macros/PGbasicmacros.pl @@ -1832,7 +1832,7 @@ sub general_math_ev3 { my $mode = shift || "inline"; $in = FEQ($in); # Format EQuations - $in =~ s/((^|[^\\])(\\\\)*)%/\1\\%/g; # avoid % becoming TeX comments (unless already escaped) + $in =~ s/((^|[^\\])(\\\\)*)%/$1\\%/g; # avoid % becoming TeX comments (unless already escaped) ## remove leading and trailing spaces so that HTML mode will ## not include unwanted spaces as per Davide Cervone.