X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/015ce28d7202abe928457f7b3e777a671ec0412d..d85c9660c5ce6f9749f3afc5c51342caf7713263:/IkiWiki/Plugin/teximg.pm diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm index 2eb13c86c..f7fd91ddf 100644 --- a/IkiWiki/Plugin/teximg.pm +++ b/IkiWiki/Plugin/teximg.pm @@ -70,27 +70,18 @@ sub create ($$$) { #{{{ my $digest = md5_hex($code, $height); - my $teximgdir = "/teximag"; - my $imglink = "$teximgdir/$digest.png"; - my $imglog = "$teximgdir/$digest.log"; + my $imglink= $params->{destpage} . "/$digest.png"; + my $imglog = $params->{destpage} . "/$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 $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))
+			.(exists $params->{alt} ? $params->{alt} : encode_entities($code))
 			.qq{}; } else {