quarto-dev / quarto-cli

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

show-notes make the speaker notes appear in the revealsjs presentation and not only in the speaker/print view #10807

Open tvatter opened 1 month ago

tvatter commented 1 month ago

Bug description

When using e.g speaker-notes: true or speaker-notes: separate-page in the yml header of a revealjs presentation, I expected the speaker notes to appear only when toggling on the print view. However, they seem to be displayed in the presentation itself, even "outside" of the speaker view. I am not sure whether this is a bug or intended? And if this is intended, is there a way to show the speaker notes only in the speaker view and print view but not in the presentation itself ?

Steps to reproduce

---
title: "Presentation"
format:
  revealjs:
    show-notes: separate-page
---

## A slide

::: notes

A note

:::

Expected behavior

image

Actual behavior

image

Your environment

No response

Quarto check output

Quarto 1.5.55
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.1: OK
      Dart Sass version 1.58.3: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.55
      Path: /home/tvatter/miniforge3/envs/intro_to_python/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: 2019

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.9 (Conda)
      Path: /home/tvatter/miniforge3/envs/intro_to_python/bin/python
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /home/tvatter/miniforge3/envs/intro_to_python/lib/R
      LibPaths:
        - /home/tvatter/miniforge3/envs/intro_to_python/lib/R/library
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")
mcanouil commented 1 month ago

Could you edit your post? Currently your code example and description are inconsistent.

show-notes: Make speaker notes visible to all viewers

From https://quarto.org/docs/reference/formats/presentations/revealjs.html.

I don't think the option is/was limited to "print".

See https://quarto.org/docs/presentations/revealjs/presenting.html#print-options.

There are a number of options that affected printed output that you may want to configure prior to printing:

It does not say, the options are restricted to print, it says, those options can affect the print view.

tvatter commented 1 month ago

Apologies for my understanding, but the documentation for print-options (https://quarto.org/docs/presentations/revealjs/presenting.html#print-options) speaker notes follow directly the documentation regarding print-to-pdf (https://quarto.org/docs/presentations/revealjs/presenting.html#print-to-pdf), and the does not mention the detailed explanation from the format's reference (https://quarto.org/docs/reference/formats/presentations/revealjs.html).

So, this behavior is indeed not a bug, but a feature. The question becomes: is there a way to show the speaker notes only in the speaker view and print view but not in the presentation itself ?

mcanouil commented 1 month ago

Apologies for my understanding, but the documentation for print-options (https://quarto.org/docs/presentations/revealjs/presenting.html#print-options) speaker notes follow directly the documentation regarding print-to-pdf (https://quarto.org/docs/presentations/revealjs/presenting.html#print-to-pdf), and the does not mention the detailed explanation from the format's reference (https://quarto.org/docs/reference/formats/presentations/revealjs.html).

No need to apologise. The section is called "print options" which is actually not really that. I'm not sure how to make this clearer.

The question becomes: is there a way to show the speaker notes only in the speaker view and print view but not in the presentation itself ?

I don't think there is currently a way so this would be an enhancement to be made.

cderv commented 1 month ago

show-notes in Quarto is a way to configure the related options from Revealjs directly (showNotes). This is a revealjs feature documented at https://revealjs.com/speaker-view/#share-and-print-speaker-notes.

It is meant to show notes to all viewer, which will obviously make them appear in print.

is there a way to show the speaker notes only in the speaker view and print view but not in the presentation itself ?

I don't think there is. You can add a :+1: to upstream feature request.

What you can do with quarto is creating two versions of you presentation, one with setting show note.

It could be done in one render this way

format:
  revealjs: default
  revealjs+notes:
    output-file: for-print.html
    show-notes: separate-page

Using <format>+variant syntax is a way to use same format twice with different option. You need to provide output-file to make sure file name is different. (though variant should have been taken into account... and it is not so I'll look into this)

mcanouil commented 1 month ago

Alternatively to the format+variant trick, you can also use a profile, see https://quarto.org/docs/projects/profiles.html.

cderv commented 1 month ago

In context of project indeed this can work!