0

In a .Rmd file with beamer_presentation output, we can create new slides with double hashtags. i.e.,

## Slide with Plot 
some text here

this will start a new slide with the title Slide with Plot and then the text some text here as contents of the slide.

Additionally, in R markdown, to specify a text as a header 2 element, we use ## some text. Now, when I place a header 1, I automatically get a new slide with the text placed in the center of the slide. When I place a header 2, I automatically get a new slide with the text at the top

Is it possible to use a header 1 or 2 within a slide without beginning a new slide?

Additionally, all header 3-header 6 sizes appear to me to be the same size.

Here is a sample .Rmd file which reproduces my question.

---
title: "SO reproduce"
author: "shayaa"
date: "August 18, 2016"
output: beamer_presentation
---

## First Slide

Some Text

# Auto Slide with Header 1

## New Slide

### Header 3 

###### Header 6 same size?

Edit: To be clear, I would like that the slide Auto Slide with Header 1 not create a new slide; rather it should simply be a text of size Header 1. I understand that if I used --- to create slides then this header will be the placed as the title of a new slide with a standard (Header 2) sized title. Note however, that if you run my code, where I define Headers by ##, this Header 1 will simply be a Header 1, but it will be placed at the middle of a new slide. My second question is how to make it so that Header 6 same size? be sized at half the size of Header 3.

shayaa
  • 2,787
  • 13
  • 19

1 Answers1

2

It's not clear what you want to do. Perhaps you're looking for new slide ---?

---
title: "SO reproduce"
author: "shayaa"
date: "August 18, 2016"
output: 
  beamer_presentation: 
    keep_tex: yes
---

# First Slide (with header 1)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

---

# Second Slide (with header 1)

## Second Slide (with header 2)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

## Second Slide (with another header 2)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

---

## Third Slide (with header 2)

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Zoë Clark
  • 1,334
  • 2
  • 13
  • 25
  • This doesn't answer my question entirely. Consider what happens when you add `# Header 1` to the beginning of a new slide. You end up with a new slide with Header 1 as the title. – shayaa Aug 18 '16 at 18:00
  • Could you edit your question to make it clearer? The only question: "Is it possible to use a header 1 or 2 within a slide without beginning a new slide?" is ambiguous and, as I read it, is resolved by my answer. – Zoë Clark Aug 18 '16 at 18:22