-
Notifications
You must be signed in to change notification settings - Fork 7
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
Code appears before plots when using figure layouts #41
Comments
Initial diagnosisWhen our lua filter encounters the layout div, in the AST the code cell looks like: Div {.cell cr-id="big-code" layout-ncol="2"}
That is, it separates the code into different CodeBlocks based on the lines that produce output, then interleaves those CodeBlocks with output (3 images and a CodeBlock to print the dataframe). At the end of our lua filter, the whole DivAbove is wrapped into two more Divs: Div {.sticky-col}
That looks about right! The fact that in the flat html format the CodeBlock is not separated and interleaved into the output suggests the filter for Next steps: write a separate lua filter that runs late to see if we can catch the AST post-layout filter. |
@jimjam-slam Oy, this was a deep cut: I think the issue is that we're looking for cr-id's which no longer are parents to the CodeBlock, so it gets treated as a separate thing. |
Dang, nice work on the diagnosis! |
Circling back to this and updating the test case following the shift to Quarto cross-ref style trigger references:
On Safari: So there's still a layout problem even though we encourage folks to wrap the entire code cell in a fenced div (rather than adding But the ID is in the right place, so it's no longer a problem with the figure layout processing — I'm assuming this is one of the many possible instances of #78 (ie. what we do with mixed content stickies). |
In
format: html
, the following document will first show the echoed code, then a two column layout with a total of three plots and a data frame. Informat: closeread-html
, the echoed code shows up after the two column layout.The text was updated successfully, but these errors were encountered: