search

Home  >  Q&A  >  body text

How to center slide title in R Markdown?

I want to add a blank slide between the two sections and a short title (single #) in the main title format in the center of it. is it possible?

P粉154228483P粉154228483478 days ago521

reply all(1)I'll reply

  • P粉903052556

    P粉9030525562023-09-16 17:02:44

    Create a slide without a title with the classes .blank-slide .flexbox .vcenter and then create the slide title directly using the h1 tag. Then use css on the .blank-slide tag under the h1 class to make it look like the title-slide title.

    ---
    title: "Untitled"
    output: ioslides_presentation
    date: "2023-06-10"
    css: style.css
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = FALSE)
    ```
    
    ## R Markdown
    
    This is an R Markdown presentation. Markdown is a simple formatting syntax.
    
    
    ## {.blank-slide .flexbox .vcenter}
    
    
    <h1>Intro to Syntax</h1>
    
    
    ## Slide with Bullets
    
    - Bullet 1
    - Bullet 2
    - Bullet 3
    
    
    ## {.blank-slide .flexbox .vcenter}
    
    <h1>More Discussion</h1>
    

    style.css

    .blank-slide h1 {
      font-size: 65px;
      line-height: 1.4;
      letter-spacing: -3px;
      color: #515151;
    }
    

    reply
    0
  • Cancelreply