Skip to content
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

Correctly handle display usage in cells #37

Closed
MichaelHatherly opened this issue Feb 23, 2024 · 4 comments
Closed

Correctly handle display usage in cells #37

MichaelHatherly opened this issue Feb 23, 2024 · 4 comments
Assignees

Comments

@MichaelHatherly
Copy link
Collaborator

No description provided.

@MichaelHatherly
Copy link
Collaborator Author

From #44:

I was copying quarto tests to use our native runner, and this failed:

---
title: Julia Subfig Test
engine: julia
---

```{julia}
Pkg.activate(temp = true)
Pkg.add(name = "Plots", version = "1.40.1")
```

## Julia Crossref Figure

```{julia}
#| label: fig-plots
#| fig-cap: "Plots"
#| fig-subcap:
#|   - "Plot 1"
#|   - "Plot 2"
#| layout-ncol: 2

using Plots
plot([1,23,2,4]) |> display

plot([8,65,23,90]) |> display
```

See @fig-plots for examples. In particular, @fig-plots-2.

So they are using display twice to get a multi-column figure output. As we don't hook into the display system but only render return values, this does not work. The question is if we want to make it work this way, or offer an alternative.

@MichaelHatherly
Copy link
Collaborator Author

The question is if we want to make it work this way, or offer an alternative.

Probably just hooking into display, unless you can think of a nicer approach.

@jkrumbiegel
Copy link
Collaborator

can we currently add arbitrarily many outputs of a given MIME type to the ipynb we output?

Probably just hooking into display

Yeah either that or with a special type MultiOutput or so that would need to be made available. I guess easier to do the display route

@MichaelHatherly
Copy link
Collaborator Author

Yeah either that or with a special type MultiOutput or so that would need to be made available.

Yes, that's an option, though if a user evals a single cell into a REPL they'll not have that type defined, which would probably be annoying.

Just following what IJulia does is probably the most straightforward thing to do currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants