I'm using Imagify directly with Pandoc to generate figures from .tex files embedded in Markdown (as ), in a document compiled to both PDF and HTML.
However, the generated images use a different font from the one specified in the Pandoc metadata. For example, even though I set mathfont: Libertinus Math , the math font in the figures remains the default (Computer Modern) instead of inheriting it. I am using LuaLaTeX as the engine in both Pandoc and Imagify.
After some investigation, I believe this issue may be a symptom of another problem: setting pdf_engine to anything other than latex in the Imagify metadata seems to have no effect when producing the figures, and they still appear to be generated using pdfLaTeX.
Supporting this, when I manually set the math font in Imagify's header-includes using a pdfLaTeX-compatible method (for example, with \usepackage[libertine]{newtxmath}), the figure font actually changes. This suggests that Imagify is not actually using LuaLaTeX to render figures, despite the metadata configuration.
Apologies if for some reason this is expected behavior and I have misunderstood how figure generation works in the plugin.
I'm using Imagify directly with Pandoc to generate figures from
.texfiles embedded in Markdown (as), in a document compiled to both PDF and HTML.However, the generated images use a different font from the one specified in the Pandoc metadata. For example, even though I set
mathfont: Libertinus Math, the math font in the figures remains the default (Computer Modern) instead of inheriting it. I am using LuaLaTeX as the engine in both Pandoc and Imagify.After some investigation, I believe this issue may be a symptom of another problem: setting
pdf_engineto anything other thanlatexin the Imagify metadata seems to have no effect when producing the figures, and they still appear to be generated using pdfLaTeX.Supporting this, when I manually set the math font in Imagify's
header-includesusing a pdfLaTeX-compatible method (for example, with\usepackage[libertine]{newtxmath}), the figure font actually changes. This suggests that Imagify is not actually using LuaLaTeX to render figures, despite the metadata configuration.Apologies if for some reason this is expected behavior and I have misunderstood how figure generation works in the plugin.