Open karthink opened 1 month ago
karthink @.***> writes:
ox-blackfriday
(included withox-hugo
) uses Org to create images of LaTeX fragments for HTML exports. Despite our attempt to maintain backward compatibility, this is currently broken with our patches, and I'm not sure why. My best guess is that
- it makes assumptions about internal Org functions that are no longer true,
If this is the case, we should simply warn them. We have no obligation to maintain backwards compatibility of undocumented features and behaviors. We might only do it when it is easy and does not stay on the way when implementing new features.
-- Ihor Radchenko // yantar92, Org mode contributor, 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
There are some backward compatibility issues that we can't handle inside Org, mainly because of how these third-party packages are coded. Maintaining an (updated) list here of Emacs packages that depend on Org that will need to be updated to handle changes introduced by org-latex-preview:
pdf-tools
pdf-annot.el
usesorg-format-latex-header
at eval/compile time. This variable is aliased to the neworg-latex-preview-preamble
, which is itself not defined until theorg-latex-preview
feature is loaded. As a result,org-format-latex-header
is not defined whenpdf-annot.el
is loaded, and it throws an error.Solution: Either we must
(require 'org-latex-preview)
inorg.el
, orpdf-annot.el
should(require 'org-latex-preview)
along with(require 'org)
.Better solution:
pdf-annot.el
should not require org in the first place, this is a very heavy operation. It's only used by one function, to create an image for a LaTeX formula. This can be handled by a utility function I will add toorg-latex-preview
. And even thenorg-latex-preview
can be a runtime dependency instead of load/compile time. Very few users actually need image previews of LaTeX text used in PDF annotations.ox-hugo
ox-blackfriday
(included withox-hugo
) uses Org to create images of LaTeX fragments for HTML exports. Despite our attempt to maintain backward compatibility, this is currently broken with our patches, and I'm not sure why. My best guess is thatox-html
, defining its own pipeline instead. We've only ensured thatox-html
continues to work correctly.In any case, we provide an API to generate images for export now that is different (and more efficient) from the older system, and we need to inform them to update their code.