]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
I've wrote a little patch for the bug in teximg (can only include fomula on
authorPatrick Winnertz <winnie@der-winnie.de>
Thu, 10 Jan 2008 01:04:51 +0000 (20:04 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 10 Jan 2008 01:04:51 +0000 (20:04 -0500)
one page).

IkiWiki/Plugin/teximg.pm

index fc890666ae32e8c548bdff2fe40270852b06563c..5f9589fdd997452527492cab2c4256a4b12954e2 100644 (file)
@@ -70,9 +70,8 @@ sub create ($$$) { #{{{
 
        my $digest = md5_hex($code, $height);
 
-       my $teximgdir = "/teximg";
-       my $imglink = "$teximgdir/$digest.png";
-       my $imglog = "$teximgdir/$digest.log";
+       my $imglink= $params->{page} . "/$digest.png";
+       my $imglog =  $params->{page} .  "/$digest.log";
        will_render($params->{destpage}, $imglink);
        will_render($params->{destpage}, $imglog);
 
@@ -83,12 +82,12 @@ sub create ($$$) { #{{{
                $logurl = urlto($imglog, $params->{destpage});
        }
        else {
-               $imgurl="$config{url}/$teximgdir/$digest.png";
-               $logurl="$config{url}/$teximgdir/$digest.log";
+               $imgurl="$params->{page}/$digest.png";
+               $logurl="$params->{page}/$digest.log";
        }
        
        if (-e "$config{destdir}/$imglink" ||
-           gen_image($code, $height, $digest, $teximgdir)) {
+           gen_image($code, $height, $digest, $params->{page})) {
                return qq{<img src="$imgurl" alt="}
                        .(exists $params->{alt} ? $params->{alt} : encode_entities($code))
                        .qq{" class="teximg" />};