Hi there, I have experienced quite a bit of trouble with getting Quarto in VS Code to navigate to the current revealjs slide. After a bit of testing, I believe I have identified the source of the problem. It is similar to issue #6409 in the quarto-dev/quarto-cli repo, but involves the slide-level YAML option. I am unsure if this persists to, say, RStudio.
I also found some other behavior which tripped me up in finding the root of the issue, which I have included at the end.
Primary Issue:
If
---
format:
revealjs:
slide-level: 3
---
Is located in either _quarto.yml or _metadata.yml, the slide preview in VS Code reverts to a different slide than the one I am currently on (e.g. looking at, previously edited, or @ cursor position). I think it processes the heading tags (##) in a weird way, because it is hard to pin down the exact behavior for an ideal MRE.
If the slide-level: 3 is located in the document YAML, however, it seems that everything is (mostly) fine. The MRE at the end should work to reproduce this, provided that slide-level: 3 is removed from the document and placed in a _quarto.yml or _metadata.yml within the project. Of course, this is replaced at the document level with format: revealjs.
Software Info:
VS Code version: 1.86.0
Quarto extension version: v1.110.1
OS: Linux Mint 21.3
Output of quarto check:
Quarto 1.4.549
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.549
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2024.01
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/cwiegand/.TinyTeX/bin/x86_64-linux
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.6 (Conda)
Path: /home/cwiegand/miniconda3/bin/python
Jupyter: 5.5.0
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.2
Path: /usr/lib/R
LibPaths:
- /home/cwiegand/R/x86_64-pc-linux-gnu-library/4.3
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.45
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
Other Strange Behavior
Here is some other interesting behavior I found along the way. See MRE for reference. Some of these could be inferred from reading the pandoc manual, but I wanted to include them here for documentation's sake.
Default "issues":
No YAML title, manual # <title-slide>,
Slide preview is one (1) slide ahead of cursor
YAML title, no # <title-slide>, yes <!-- <html-comment> --> before first slide
Slide preview is one (1) slide behind cursor
YAML title, manual # <title-slide>, <!-- <html-comment> --> before the title slide
Slide preview is one (1) slide behind cursor
slide-level: 3 (within document YAML) "issues":
Without a YAML title, no html comments, optional # title slideor## section slide
Slide preview is 1 slide ahead of cursor
With a YAML title, no manual # title slide, but an html comment before first slide (even a section slide)
Slide preview is 1 slide behind cursor
With a YAML title and manual # title slide, but an html comment before title slide
Slide preview is 1 slide ahead of cursor
MRE (document level):
---
format:
revealjs:
slide-level: 3
title: "test"
---
<!-- html-comment -->
# title
## section
### Slide 1
- content
### Slide 2
- list
### Slide 3
update
### Slide 4
The end
Hi there, I have experienced quite a bit of trouble with getting Quarto in VS Code to navigate to the current
revealjs
slide. After a bit of testing, I believe I have identified the source of the problem. It is similar to issue #6409 in thequarto-dev/quarto-cli
repo, but involves theslide-level
YAML option. I am unsure if this persists to, say, RStudio.I also found some other behavior which tripped me up in finding the root of the issue, which I have included at the end.
Primary Issue:
If
Is located in either
_quarto.yml
or_metadata.yml
, the slide preview in VS Code reverts to a different slide than the one I am currently on (e.g. looking at, previously edited, or @ cursor position). I think it processes the heading tags (##
) in a weird way, because it is hard to pin down the exact behavior for an ideal MRE.If the
slide-level: 3
is located in the document YAML, however, it seems that everything is (mostly) fine. The MRE at the end should work to reproduce this, provided thatslide-level: 3
is removed from the document and placed in a_quarto.yml
or_metadata.yml
within the project. Of course, this is replaced at the document level withformat: revealjs
.Software Info:
1.86.0
v1.110.1
quarto check
:Other Strange Behavior
Here is some other interesting behavior I found along the way. See MRE for reference. Some of these could be inferred from reading the
pandoc
manual, but I wanted to include them here for documentation's sake.Default "issues":
title
, manual# <title-slide>
,title
, no# <title-slide>
, yes<!-- <html-comment> -->
before first slidetitle
, manual# <title-slide>
,<!-- <html-comment> -->
before the title slideslide-level: 3
(within document YAML) "issues":title
, no html comments, optional# title slide
or## section slide
title
, no manual# title slide
, but anhtml comment
before first slide (even a section slide)title
and manual# title slide
, but anhtml comment
before title slideMRE (document level):