You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if I've missed an existing feature request for this, I did search for one and didn't find anything relevant.
When exporting, without --with-clicks, the docs say:
By default, Slidev exports one page per slide with clicks animations disabled.
From what I can tell, this is (always?) the last "click" for each slide. This is not always the most useful representation of a slide and it is sometimes useful to export an earlier click on that slide.
Also, it is sometimes useful to have a few of the click states rendered on selected slides, but not all of them (for example in a lengthy magic-move sequence). Additionally, it may be useful to have some slides optionally omitted from the export (perhaps due to sensitive data).
A concrete example is a before/after "refactoring" slide, where, say, some "bad" code is shown on the first click, and then magic-move is used over, say, 20 animated steps, to work towards the final click which shows the "good" version of the code, and in the final export perhaps only the first and last clicks are actually useful in a PDF.
I propose a way to specify, for a specific slide (perhaps in the YAML frontmatter for the slide), the click or clicks that will be rendered to PDF when --with-clicks is not provided.
For example:
By default, the current behaviour for each slide continues, but for this page that has a, say, export: OnClicks: entry:
---
export:
forClicks: 1-3,*
---
# My Slide
<v-clicks>
* one
* two
* three
* four
* five
</v-clicks>
When export is run with --with-clicks, the PDF would contain pages only for click states 1, 2, 3 and the final slide state for this specific page.
The forClicks field could take individual click numbers (e.g 1), ranges (3-5), sequences delimited by ,, and the special * to indicate the final click on that page, whatever that might ultimately be.
This would also allow pages to be skipped from the export if the forClicks: value is empty/null.
Since the default behaviour would remain unchanged, this would be a purely opt-in feature, and not affect any existing presentations.
A workaround is to use the --with-clicks to render all click states and then remove the superfluous pages. This is actually really tedious. To do this in my real presentation I end up with over 700 slides and have to manually remove 550 of them to get the set I want.
The text was updated successfully, but these errors were encountered:
DavidAntliff
changed the title
A mechanism to specify which clicks should be exported on a per-slide basis
Feature Request: a mechanism to specify which clicks should be exported on a per-slide basis
Jul 4, 2024
I agree it makes sense and the technically side it should be possible. But I see the problem more like how we should design the syntax. Any proposals/ideas?
Apologies if I've missed an existing feature request for this, I did search for one and didn't find anything relevant.
When exporting, without
--with-clicks
, the docs say:From what I can tell, this is (always?) the last "click" for each slide. This is not always the most useful representation of a slide and it is sometimes useful to export an earlier click on that slide.
Also, it is sometimes useful to have a few of the click states rendered on selected slides, but not all of them (for example in a lengthy magic-move sequence). Additionally, it may be useful to have some slides optionally omitted from the export (perhaps due to sensitive data).
A concrete example is a before/after "refactoring" slide, where, say, some "bad" code is shown on the first click, and then magic-move is used over, say, 20 animated steps, to work towards the final click which shows the "good" version of the code, and in the final export perhaps only the first and last clicks are actually useful in a PDF.
I propose a way to specify, for a specific slide (perhaps in the YAML frontmatter for the slide), the click or clicks that will be rendered to PDF when
--with-clicks
is not provided.For example:
By default, the current behaviour for each slide continues, but for this page that has a, say,
export: OnClicks:
entry:When export is run with
--with-clicks
, the PDF would contain pages only for click states 1, 2, 3 and the final slide state for this specific page.The
forClicks
field could take individual click numbers (e.g1
), ranges (3-5
), sequences delimited by,
, and the special*
to indicate the final click on that page, whatever that might ultimately be.This would also allow pages to be skipped from the export if the
forClicks:
value is empty/null.Since the default behaviour would remain unchanged, this would be a purely opt-in feature, and not affect any existing presentations.
A workaround is to use the
--with-clicks
to render all click states and then remove the superfluous pages. This is actually really tedious. To do this in my real presentation I end up with over 700 slides and have to manually remove 550 of them to get the set I want.The text was updated successfully, but these errors were encountered: