-
Notifications
You must be signed in to change notification settings - Fork 389
Prefer text/latex and application/pdf mime types when rendering latex
#13582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
I can help you with that. Quarto structures its before- and after-engine files so that you can take the .ipynb (or keep-md) output of an engine and call With that said, I wonder if At the same time, I think you should be able to figure out how to make |
|
Ok I've added the ability to set |
|
@cscheid could you help me with the testing issues I noted above? Would be great to get this sorted :) |
|
@jkrumbiegel I am just adding some tests related to rsvg-convert presence in #13661 So possibly this will help here.
To clarify, we don't have
Using |
|
@cderv The issue was that from the images available in the ipynb, SVG was preferred over PDF when rendering LaTeX. But this would only be noticeable if the required conversion via rsvg-convert failed. So without involvement of rsvg-convert at all, the test would somehow have to show that PDF was picked for the final render, what pandoc receives. But I'm not sure how that could be done. |
Currently, rendering a qmd which creates a CairoMakie plot to pdf via LaTeX can error if
rsvg-convertis not available on the path.An example qmd for this is
Now I was wondering how this could happen if CairoMakie is able to produce both svg and pdf outputs. I would have expected this error to only appear when only svg was available. However, I confirmed that with default settings, the julia engine sends back svg, pdf and png within the jupyter notebook JSON.
I then checked why the pdf output was apparently ignored and I noticed that the
text/latexandapplication/pdfMIME types were added to the end of the priority queue for latex, which meant that any other MIME type would take priority. I've fixed this by changingpushtounshiftfollowing the earlier entry for markdown.I'll need some help in adding a simple test for this, having rsvg-convert on the PATH will hide the problem.
Checklist
I have (if applicable):