sub latexquote { my $string = shift; $string =~ s/&/\\&/g; $string =~ s/\$/\\\$/g; $string =~ s/#/\\#/g; return $string; }