X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/086349813284211ede63430b03f8278143b2ab4f..9ddb0407d25452a94bfb65680ad89508e3bce90f:/IkiWiki/Plugin/teximg.pm diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm index 957f71a6e..0753a9a77 100644 --- a/IkiWiki/Plugin/teximg.pm +++ b/IkiWiki/Plugin/teximg.pm @@ -70,25 +70,16 @@ sub create ($$$) { #{{{ my $digest = md5_hex($code, $height); - my $teximgdir = "/teximag"; - my $imglink = "$teximgdir/$digest.png"; - my $imglog = "$teximgdir/$digest.log"; - will_render($params->{destpage}, $imglink); - will_render($params->{destpage}, $imglog); - - my $imgurl; - my $logurl; - if (! $params->{preview}) { - $imgurl = urlto($imglink, $params->{destpage}); - $logurl = urlto($imglog, $params->{destpage}); - } - else { - $imgurl="$config{url}/$teximgdir/$digest.png"; - $logurl="$config{url}/$teximgdir/$digest.log"; - } + my $imglink= $params->{page} . "/$digest.png"; + my $imglog = $params->{page} . "/$digest.log"; + will_render($params->{page}, $imglink); + will_render($params->{page}, $imglog); + + my $imgurl=urlto($imglink, $params->{destpage}); + my $logurl=urlto($imglink, $params->{destpage}); if (-e "$config{destdir}/$imglink" || - gen_image($code, $height, $digest, $teximgdir)) { + gen_image($code, $height, $digest, $params->{page})) { return qq{}
 			.(exists $params->{alt} ? $params->{alt} : encode_entities($code))
 			.qq{};