> Another problem: Looks like if latex fails to create the image, the user won't be shown any
> of its error message, but just "failed to generate image from code". I suspect that in this
> case being able to see the error message would be important.
> Another problem: Looks like if latex fails to create the image, the user won't be shown any
> of its error message, but just "failed to generate image from code". I suspect that in this
> case being able to see the error message would be important.
>>> from the rest of the page. (Actually, ikiwiki preprocessor directives in
>>> general could mark up their errors better.)
>>> from the rest of the page. (Actually, ikiwiki preprocessor directives in
>>> general could mark up their errors better.)
> The url handling could stand to be improved. Currently it uses $config{url}, so it depends on that being set. Some ikiwiki builds don't have an url set. The thing to do is to use urlto(), to generate a nice relative url from the page to the image.
>> Mh... i choose one single dir explizitly since if you use on several pages the same formula this would really improve the time to generate the formulas and it would waste extra space if you store every formula 3-4 times. But if you really like I'll change this behaviour.
> The url handling could stand to be improved. Currently it uses $config{url}, so it depends on that being set. Some ikiwiki builds don't have an url set. The thing to do is to use urlto(), to generate a nice relative url from the page to the image.
>> Mh... i choose one single dir explizitly since if you use on several pages the same formula this would really improve the time to generate the formulas and it would waste extra space if you store every formula 3-4 times. But if you really like I'll change this behaviour.
> Another (minor) problem with the url handling is that you put all the images in a "teximages" directory in the toplevel of the wiki. I think it would be better to put each image in the subdirectory for the page that created it. See how the `img` and `sparkline` plugins handle this.
> It looks like if the tempdir already exists, tempdir() will croak(), thus crashing ikiwiki. It would be good to catch a failure there and fail more gracefully.
> Another (minor) problem with the url handling is that you put all the images in a "teximages" directory in the toplevel of the wiki. I think it would be better to put each image in the subdirectory for the page that created it. See how the `img` and `sparkline` plugins handle this.
> It looks like if the tempdir already exists, tempdir() will croak(), thus crashing ikiwiki. It would be good to catch a failure there and fail more gracefully.
>>> Or just propigate up an error message. If it's failing, someone is
>>> probably trying to DOS ikiwiki or something. :-)
>>> Or just propigate up an error message. If it's failing, someone is
>>> probably trying to DOS ikiwiki or something. :-)
> I'm not sure why you're sanitising the PATH before calling latex. This could be problimatic on systems where latex is not in /bin or /usr/bin
>> Okay what do you suggest to use as PATH?
> I'm not sure why you're sanitising the PATH before calling latex. This could be problimatic on systems where latex is not in /bin or /usr/bin
>> Okay what do you suggest to use as PATH?