quarto-dev / quarto-cli

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

The `fragment-index` Has No Effect on Images for `Reveal.JS` #3539

Open RoyiAvital opened 1 year ago

RoyiAvital commented 1 year ago

Bug description

It seems that Quarto doesn't apply the fragment-index to images:

## How to Measure

::: {.incremental}
- Assume we have 2 variants of a website: `A` and `B`.
- How would we measure their design effect on user engagement?
:::

![](https://i.imgur.com/PSZggyN.png){.absolute bottom=0 .fragment .fade-in-then-out fragment-index=20}

The output will have data-fragment-index=0 for the image.

In the case above I want the image to appear in sync with an item of the list. So I'd like to be able to have ![](https://i.imgur.com/PSZggyN.png){.absolute bottom=0 .fragment .fade-in-then-out fragment-index=20} yet what ever I do, I can't control its index.

Just as a note, it would be great to be able to have control on the index in .incremental. Maybe something like defining the index of the first item (Then all are chained)?

This is tested on Windows 10, VS Code, Quarto Extension 1.56 and Quarto CLI 1.2.269.

Checklist

cscheid commented 1 year ago

Incremental is a Pandoc feature, and it's a feature of lists specifically: https://pandoc.org/MANUAL.html#incremental-lists

We would have to intercept and reimplement that entire infrastructure to enable this. It'd be a great one to have, but it's not in our short-to-medium-term radar.

RoyiAvital commented 1 year ago

OK, I get that we won't be able to make the {.incremental} thing be explicit (Unless we ask pandoc guys?).

But the image losing its index is the bug I'm after. Is there a way to force the index on the image?

cscheid commented 1 year ago

That image isn't part of the incremental list, so I think what you're suggesting can't work. You might have better luck with pauses (. . .), as explained here.

RoyiAvital commented 1 year ago

Leave alone the effect I want to achieve. I get it is not achievable as things now (What I do is manually add indices to the elements). The image itself doesn't retain the index set to it. That's the bug I reported.

RoyiAvital commented 1 year ago

@cscheid , I created https://github.com/quarto-dev/quarto-cli/discussions/3559. Could you mark this as a bug and only pay attention to the issue of the fragment-index of the image?