Asilata Bapat <[email protected]> writes:

>> This will make Org create ltximg directory with previews in current
>> directory (where the export is called). I am not sure if this is
>> desired. Could you please provide more details about the context when
>> you encountered the bug?
>
> I agree - this is perhaps not the desired behaviour. I encountered the bug 
> while using the org-mime package, as below.
>
> The function org-mime-org-subtree-htmlize fails to run when the subtree in 
> question contains (inline) LaTeX. I dug through this error and found that the 
> options plist that gets passed along to org-html-format-latex by this 
> function is just (:with-latex imagemagick). In particular, it does not 
> contain the property :output-file. The function org-html-format-latex tries 
> to set cache-dir to (file-name-directory <value of :output-file>), which 
> evaluates to (file-name-directory nil), raising an error. The reason I put in 
> this particular patch is that I think (file-name-directory nil) should really 
> just evaluate to nil rather than throwing an error. But maybe there is a 
> cleaner way to deal with this. Please let me know what you think and I am 
> happy to submit an updated patch if you like. Thanks!

In a sense, an error makes sense here - when producing HTML with this
setup, the HTML will contain links to latex fragment images. Those links
have little meaning without html *file* referencing to them.

I can, indeed, avoid the error, by setting image store dir to be, say,
/tmp/, but what will it achieve other than not throwing runtime error?
org-mime will be broken in such scenario - the inline fragment won't be
rendered in the results html email.

So, I am thinking that the best approach will be still throwing a
runtime error, although more descriptive.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to