quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.77k stars 309 forks source link

RevealJS `reference-location: section` does not number correctly #8545

Open cderv opened 7 months ago

cderv commented 7 months ago

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/8534

---
title: test
format:
  revealjs:
    center: true
reference-location: section
---

## Slide 1

- bullet one
- bullet two^[first footnote]
- This is the third bullet

## Slide 2

more test text here^[second footnote]

This leads to wrong numbering image

Either this is an issue, or we should just disallow reference-location: section as I am not sure it makes sense in revealjs context

For context, we do special processing for footnotes in format-reveal.ts when not set to document level. So probably there to handle it correctly.

mcanouil commented 7 months ago

Either this is an issue, or we should just disallow reference-location: section as I am not sure it makes sense in revealjs context

It does number correctly, but from level one header as for html format. Basically, if set it should either be ignored or account for level two (not one).

cderv commented 7 months ago

Sorry, I don't understand. In HTML the numbering of footnote is sequential and by default at the end. the reference-location: section just moves under each section but keeps the sequential numbering in the doc.

---
title: test
format: html
reference-location: section
---

# Header 1 

## Sub 1

- bullet one
- bullet two^[first footnote]
- This is the third bullet

## Sub 2

more test text here^[second footnote]

# Header 2 

## Sub 3

more test text here^[second footnote]

image

For reveals, we do special process of footnotes when reference-location is not document (in format-reveal.ts), and so I am thinking something is not right as the sequential footnote is not changed

mcanouil commented 7 months ago

Never mind, the numbering is completely messed up with the option regardless of headings.

image
cderv commented 7 months ago

yes, this is why I opened the issue in the first place.

mcanouil commented 7 months ago

It's messed up but only in the footer.

FYI reference-location: document

image
cderv commented 7 months ago

Yes, as I said above in https://github.com/quarto-dev/quarto-cli/issues/8545#issuecomment-1922188181 we do a special processing in format-reveal.ts when reference-location is different than document.

This process is about getting the footnotes and splitting them on each related slides.