aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorPatrick Winnertz <winnie@der-winnie.de>2008-01-09 20:04:51 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-09 20:04:51 -0500
commit81c726982b36dcea932c8570151095a55c0b0473 (patch)
tree6534525ccc997e4999f47c9a85d314bb774173e5 /IkiWiki
parent141d36388836d2fba71b5aa206d944df3cca3eac (diff)
downloadikiwiki-81c726982b36dcea932c8570151095a55c0b0473.tar
ikiwiki-81c726982b36dcea932c8570151095a55c0b0473.tar.gz
I've wrote a little patch for the bug in teximg (can only include fomula on
one page).
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/teximg.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/teximg.pm b/IkiWiki/Plugin/teximg.pm
index fc890666a..5f9589fdd 100644
--- a/IkiWiki/Plugin/teximg.pm
+++ b/IkiWiki/Plugin/teximg.pm
@@ -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" />};