On Friday, 24 February 2023 18:49:10 CET Timothy wrote: > Hi Chris, > > > Note: I haven’t been able to compute the return value of the hash function > > for > > my latex expression, because I can’t figure out what the arguments actually > > are, > > specifically `forbuffer`, `fg` and `bg`, but the above reasoning seems > > sound. > > Note: Removing specifically the images looking like the image associated > > with > > the latex expression that refuses to be regenerated, using some file > > manager, > > and then invoking `org-latex-preview`, does the trick, but it’s impractical. > > Yea, `org-format-latex' is a bit of a nightmare. I’ve got a WIP overhaul of > the > entire LaTeX preview system which is currently 95% of the way done. The new > system will still not notice changes in package source files, but it will be > easy to clear the cache and regenerate.
There is that, which is supposed to be included in org-mode 9.7: https://github.com/karthink/org-preview? I suppose for image regeneration it needs user manual intervention, otherwise it's the same to do `rm ltximg/*`. If I were able to compute the output of the hash function I could have decided which image to selectively remove. > > All the best, > Timothy > >