-
Notifications
You must be signed in to change notification settings - Fork 353
Formatting Issues when rendering figures with Julia Engine #10469
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
Comments
First, if you want to change the engine, moving around the front matter is really not the way. Second, I believe the issue (which does not require a book) is related if not the exact same issue as: |
What’s the recommended place to set the engine to Julia? At the top of each qmd above all other content? |
It's called YAML frontmatter. Putting the block elsewhere means it's no longer the front matter but a simple metadata block. |
I'm not sure that this is the same issue as #7817, is it? When using the Further, adding I think the issue could be resolved by manually setting the figure's size, but I'm not sure how to get the default figure sizes? It seems like these are defined outside of the normal code in the IJulia startup (referring to |
I don't really use Julia and the native Julia engine is a community contribution. @jkrumbiegel might be able to help here. |
I'm just guessing here but it could be that the julia engine reports the pixel size of the image differently than ijulia, so the placed size in the pdf differs even though the actual figure size might be the same. Because at first glance it doesn't look like the figure size is huge (the text labels look reasonably sized compared to the plotting area). And zooming in, the picture seems pixelated, so that also points to the final size for the pdf being set incorrectly. I would maybe check the intermediate md with |
Thanks! Additionally, to |
It looks like in the intermediate markdown files, the difference is: First chapter which renders okay:
Second chapter which renders too big:
Is there anyway to turn off the size annotation? I tried adding in the code settings like |
Yeah this is exactly what I figured. Could be that ijulia doesn't send out the original size of the png at all? I remember that we did this explicitly for some reason, but it's just metadata and we don't force quarto to use it in this way. I don't remember what the precedence case was though, in general we tried to mirror the ijulia behavior where it was appropriate. |
seems to be fixed in Quarto 1.6.6, provided you add
in the YAML frontmatter. |
At least with Makie, this issue can be considered fixed with QuartoNotebookRunner v0.12.2 and Makie#master. QuartoNotebookRunner now annotates pngs with dpi info with the corrected size. While quarto could in principle also read out png dpi, it doesn't seem to consistently do that and we don't have a "retina" mode, so the associated workarounds in quarto don't apply to us. With those versions, Makie's pngs have the same visual size irrespective of their |
Uh oh!
There was an error while loading. Please reload this page.
Bug description
When using the
engine: julia
the figures do not render as anticipated (they are very large and take up the whole page). In this MWE and attached PDF, see how the second chapter renders the figure as a whole page.Perhaps the
---
is interfering with the heading markdown syntax? Or should the---
section be recognized if it's below the heading?Example output with issue.pdf, and screenshot here:
Steps to reproduce
A clonable MWE repo is here: https://github.com/alecloudenback/engine-mwe
When
engine:julia
is below the title (as inindex.qmd
), it uses Jupyter pipeline. Whenengine: julia
is above the title (as inindex2.qmd
), the figures get overly large.Terminal output of rendering:
Expected behavior
The renderer should use the Julia engine, not Jupyter, and the figure should not be the wrong size.
Actual behavior
The figure gets enlarged when using the Julia engine.
Your environment
Mac 14.5, M3. VS Code
Quarto check output
The text was updated successfully, but these errors were encountered: