Skip to content

unexpected output-location: slide behaviour in revealjs #1254

@DOSull

Description

@DOSull

Bug description

Great tool, which I'm enjoying a lot!

Using revealjs presentation I have a pattern like this:

## Slide before
Words

## The slide with the code 
```{python}
#| echo: true
#| output-location: slide
# code that generates an image
```

## The slide after
Words

This causes the image generated by the code in the middle slide not to appear until after the slide after. A bit of experimentation seems to show that the image doesn't appear until before the next slide at the top # Single hash level. In other words, the code-generated image doesn't show up until the end of that section of the presentation.

That is the output from the code block isn't 'flushed out' until before the next slide at a 'level above'. The behaviour is a bit reminiscent of how LaTeX flushes a 'float' image to the end of a chapter or article if it can't find a place for it.

I'm using vertical navigation, with slide-level at the default level 2. But changing those settings doesn't make any difference. The only thing that does is starting a new top-level slide.

In case it matters the code generating the image uses matplotlib plotting.

Here's the quarto check output

[✓] Checking Quarto installation......OK
      Version: 0.9.600
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.8.8 (Conda)
      Path: /home/osullid3/anaconda3/bin/python
      Jupyter: 4.10.0
      Kernels: python3

(|) Checking Jupyter engine render....Traceback (most recent call last):
  File "/opt/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/opt/quarto/share/jupyter/notebook.py", line 17, in <module>
    from nbclient import NotebookClient
ModuleNotFoundError: No module named 'nbclient'
[✓] Checking Jupyter engine render....OK

I had not noticed the reported jupyter engine problem before this and it hasn't affected me making slides so far.

I am running VSCode 1.67.0 and the Quarto extension 1.24.0 on Ubuntu 20.0.4

Checklist

  • formatted your issue so it is easier for us to read?
  • included a minimal, self-contained, and reproducible example?
  • documented the quarto version you're running, by providing the output produced by quarto check in a terminal in your issue?
  • documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • documented which operating system you're running? If on Linux, please provide the specific distribution as well.
  • upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions