X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/34fff64e7b56f4f8cd99430f9f927d2a5d1e3619..bd6a4567fda279697962cc13efa0c293edae2e71:/IkiWiki/Plugin/teximg.pm diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm index 0aaa79698..e0f97614b 100644 --- a/IkiWiki/Plugin/teximg.pm +++ b/IkiWiki/Plugin/teximg.pm @@ -8,10 +8,12 @@ use strict; use Digest::MD5 qw(md5_hex); use File::Temp qw(tempdir); use HTML::Entities; +use Encode; use IkiWiki 3.00; my $default_prefix = <{page} . "/$digest.png"; my $imglog = $params->{page} . "/$digest.log"; @@ -142,10 +144,10 @@ sub gen_image ($$$$) { } my $tex = $config{teximg_prefix}; - $tex .= '$$'.$code.'$$'; + $tex .= '\['.$code.'\]'; $tex .= $config{teximg_postfix}; - $tex =~ s!\\documentclass{article}!\\documentclass[${height}pt]{article}!g; - $tex =~ s!\\documentclass{scrartcl}!\\documentclass[${height}pt]{scrartcl}!g; + $tex =~ s!\\documentclass\{article}!\\documentclass[${height}pt]{article}!g; + $tex =~ s!\\documentclass\{scrartcl}!\\documentclass[${height}pt]{scrartcl}!g; my $tmp = eval { create_tmp_dir($digest) }; if (! $@ &&