2

I'd like to repeat my title slide at the end of my quarto reveal.js presentation.

I'm looking for a command like title-slide or something other.

Thanks

JBF
  • 35
  • 5

1 Answers1

2

As I have already mentioned in the comment, you can make use of some javascript code and CSS to automatically repeat your title slide at the end of the presentation.

Attach the following append-title-slide.html file in the presentation using the include-in-header YAML key in quarto.

append-title-slide.html

<script>
  function move_titleSlide() {
      var titleSlide = document.querySelector('section#title-slide');
      var titleSlideClone = titleSlide.cloneNode(true);
      titleSlideClone.id = 'title-slide-cloned';
      document.querySelector('.reveal .slides').appendChild(titleSlideClone);
      Reveal.sync();
  }

  window.document.addEventListener("DOMContentLoaded", function (event) {
    move_titleSlide();
  });
</script>


<style>
  #title-slide-cloned {
    text-align: center
  }

  #title-slide-cloned .subtitle {
    margin-bottom: 2.5rem
  }
</style>

presentation.qmd

---
title: "Title Slide"
subtitle: "Its a subtitle"
author: None
date: last-modified
format: 
  revealjs:
    include-in-header: append-title-slide.html
slide-number: true
---

## Quarto

Quarto enables you to weave together content and executable code into a finished presentation. To learn more about Quarto presentations see <https://quarto.org/docs/presentations/>.

## Bullets

When you click the **Render** button a document will be generated that includes:

-   Content authored with markdown
-   Output from executable code

## Code

When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code. You can embed code like this:

```{r}
1 + 1
```

shafee
  • 15,566
  • 3
  • 19
  • 47
  • Hello ! Thanks a lot for this perfectly functionnal answer ! Is it possible to add a call for these slide, because I'd like finally to put this slide and after some additional uncounted slides like [this](https://quarto.org/docs/presentations/revealjs/advanced.html#slide-visibility) – JBF May 15 '23 at 08:21
  • What do you mean by "adding a call" for slides? – shafee May 15 '23 at 09:16
  • I'd like to "call" my title slide, like in Beamer (# titlepage for example), and add after ## additionnal slide {visibility="uncounted"}. These additionnal slides are as appendix – JBF May 16 '23 at 07:59
  • Oh, I get it. But you should have said all of these in your question at the very first (like "I want to repeat my title slide again and then add some uncounted slides after that title slide"). But now **though my answer answers perfectly your question in title, it will not be useful to you** : ) – shafee May 16 '23 at 08:08
  • So here's what I would suggest. At first, accept this answer since it does answer your initial question and then post another question with those additional questions you have! – shafee May 16 '23 at 08:13
  • Yes, you are right. I'm sorry. I've already tried to vote your answer yesterday, but I'm not 15 reputation so I can't cast a vote. I'm trying to make your suggestion, this reputation score would increase ! It's done [here](https://stackoverflow.com/questions/76261113/repeat-title-slide-at-end-of-reveal-js-presentation-and-add-additionnal-slides-a) – JBF May 16 '23 at 08:53