Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only the first "notes" class element of each slide shows up in the speaker view #3269

Closed
TS-CUBED opened this issue Sep 3, 2022 · 6 comments

Comments

@TS-CUBED
Copy link

TS-CUBED commented Sep 3, 2022

I write my lecture notes and presentations using Reveal.js (well, I use org-mode or Quarto for the actual writing, but that should not be a problem, since the resulting HTML code has the right notes in it).

One nice feature is that I can define multiple "notes" sections in the Org-Mode/Markdown, which do not show up on the slides, but do show up on the HTML (as a website) or PDF export. That way can generate handouts and presentation from the same file.

The Markdown file looks like:

## Note test

::: {.notes}
Some notes
:::

Some slide text

::: {.notes}
and some more notes
:::

## References

which is exported to Reveal.js HTML as:

<section id="note-test" class="slide level2 center">
<h2>Note test</h2>
<aside class="notes">
<p>Some notes</p>
<style type="text/css">
        span.MJX_Assistive_MathML {
          position:absolute!important;
          clip: rect(1px, 1px, 1px, 1px);
          padding: 1px 0 0 0!important;
          border: 0!important;
          height: 1px!important;
          width: 1px!important;
          overflow: hidden!important;
          display:block!important;
      }</style></aside>
<p>Some slide text</p>
<aside class="notes">
<p>and some more notes</p>
<style type="text/css">
        span.MJX_Assistive_MathML {
          position:absolute!important;
          clip: rect(1px, 1px, 1px, 1px);
          padding: 1px 0 0 0!important;
          border: 0!important;
          height: 1px!important;
          width: 1px!important;
          overflow: hidden!important;
          display:block!important;
      }</style></aside>
</section>

Which means that the two notes sections both get exported.

However, when I switch to Speaker Mode only the first note section on each slide is visible.

Is it possible to make Speaker Mode collect all the notes sections on the slide?

The Speaker Mode frame only has:

Notes

Some notes

in it. So it does not show the second notes div. I guess the parser just stops when it has found the first notes div.

It does work as expected with HTML and PDF (via PanDoc and LaTeX) where I get the notes interspersed with the slide text to get the handouts. The HTML code still has "notes" divs, but the browser simply ignores the "notes" class (no CSS for it, I assume).

<section id="note-test" class="level2">
<h2 class="anchored" data-anchor-id="note-test">Note test</h2>
<div class="notes">
<p>Some notes</p>
</div>
<p>Some slide text</p>
<div class="notes">
<p>and some more notes</p>
</div>
</section>
@lechten
Copy link
Contributor

lechten commented Sep 5, 2022

I suggested PR #3010, which may work for you.

@TS-CUBED
Copy link
Author

TS-CUBED commented Sep 5, 2022 via email

@lechten
Copy link
Contributor

lechten commented Sep 5, 2022

I did not receive feedback on that PR, so I do not know where maintainers might want to go...

@hakimel
Copy link
Owner

hakimel commented Sep 5, 2022

Sorry about the slow reply and thanks for the PR.

I just tested and merged your changes so this issue has been resolved.

@hakimel hakimel closed this as completed Sep 5, 2022
@lechten
Copy link
Contributor

lechten commented Sep 5, 2022

Many thanks!

@TS-CUBED
Copy link
Author

TS-CUBED commented Sep 5, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants