I am using rmdformats::robobook as my format for an r-markdown document. While I like the depth of the TOC for that template, I dislike the continuous scrolling. I prefer how rmdformats::material only allows you to scroll as far as the 1st level header / starts a new page for each h1 (but I dislike that I can't increase the depth of the TOC).
So, my question: Is there a simple way to modify or an argument in the yaml that would tell it to make a new page by some level of header (e.g. just h1 or h1 and h2, but not h3)? I guess similar to how the TOC and page display in R Markdown: the Definitive Guide function (I could not find that available as a template).
Reproducible code:
---
title: "tmp"
output:
rmdformats::robobook:
toc_depth: 2
toc_float:
collapsed: FALSE
use_bookdown: TRUE
---
# Section 1
`r OpenRepGrid::randomWords(250)`
## Subsection 1
`r OpenRepGrid::randomWords(250)`
### not in TOC
`r OpenRepGrid::randomWords(250)`
# Section 2
`r OpenRepGrid::randomWords(250)`
## Subsection 2
`r OpenRepGrid::randomWords(250)`
### not in TOC
`r OpenRepGrid::randomWords(250)`
Related
In a LaTex beamer presentation generated with rmarkdown::beamer_presentation, how can I remove the slide numbers for specific slides?
Since the slides contain plots and tables generated by R-markdown, plain LaTex approaches like the attempt below likely won't work.
``` {=latex}
\begin{frame}[noframenumbering]{Frame name}
Frame without slide number but with Rmd-generated tables and plots.
- All other frames still have slide numbers.
\end{frame}
```
The noframenumbering option is not what you think it is. It is to exclude the frame from being counted.
To remove the footline with the page numbering, you can use the plain option:
---
output:
bookdown::pdf_book:
base_format: rmarkdown::beamer_presentation
theme: "THEMENAME"
slide_level: 2
keep_tex: true
---
## Slide 1 {.noframenumbering}
test
## Slide 2 {.plain}
test
## Slide 3
test
This is a follow up question to this. I'd like to put a header within a {.tabset} that does not get referenced by the TOC or break the tabbing. For example:
---
output:
html_document:
toc: true
toc_float: true
---
# Tabset 1 {.tabset}
## A
Text under tab A
<h1>Don't want this in TOC</h1>
## B
Text under tab B
Produces this:
Is there anyway to format text like a header but not have it referenced in the TOC?
Going by the comments there already seems to be an issue dealing with this particular problem.
However, a simple workaround would be to use a normal <p> tag but style it like a header. So for your particular example you could do the following:
---
output:
html_document:
toc: true
toc_float: true
---
# Tabset 1 {.tabset}
## A
Text under tab A
<p style="font-weight:600; font-size:36px">Paragraph that looks like a header.</p>
## B
Text under tab B
According to this link a value of 600 for font-weight qualifies as semi-bold which is what Bootstrap seems to be using for their <h1> headers.
I'm looking for a way to evaluate code in a incremental way in R markdown presentation. I don't need to use any specific format - it can be anything that works and is flexible (rpres, ion, revealjs, etc.)
I'll use these presentation in class for my students and would like to make them type code in their R Console first and then compare our outputs.
So far I came up with one solution using revealjs with slide_level header
---
title: "Test presentation"
output: revealjs::revealjs_presentation
slide_level: 2
---
# Level 1 horizontal main slide
Some text
## Level 2 vertical slide with R Code
```{r eval=FALSE}
summary(cars)
```
## Level 2 vertical slide with R output
```{r echo=FALSE}
summary(cars)
```
Anything easier and less time consuming would be great.
I know the question is a bit old but you can use the incremental option for example with ioslides. That way you don't have to change slide but you can print step by step first the text then the code and then the result.
example code:
---
title: "Test presentation"
output:
ioslides_presentation:
incremental: yes
---
## Slide 1
- Some text
- Level 2 just the code
```{r eval=FALSE}
summary(cars)
```
- Level 2 just the output
```{r echo=FALSE}
summary(cars)
```
I have a simple test .Rmd script which I am using to generate a PDF file with the rmarkdown render function.
When I set the toc to be true, the second PDF page is a blank white page and I would expect to see 'Slide With Bullets' and 'Slide with R Code and Output' to be in there.
Does anyone know how to format the slide titles so that they appear in the table of contents?
---
title: "test"
author: "test"
date: '2015-10-29'
output: beamer_presentation
toc: true
---
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
## Slide with R Code and Output
```{r}
summary(cars)
```
According to the documentation toc only works with level 1 headings. So the code below will create a table of contents to the title slide. I can't get it to work with slides that contain content though. Maybe this is how the table of contents is designed to work???
---
title: "Untitled"
output:
beamer_presentation:
toc: yes
---
# A Title Slide:
## Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
## Slide with R Code and Output
```{r}
summary(cars)
```
I am using rmarkdown to make beamer presentations in RStudio. I would want to get slide tickers on the top of presentation. Dresden theme should support those tickersDresden
So is it possible to get those tickers by using rmarkdown? When I knit pdf I get presentation without slide tickers.
Example code:
---
title: "Example"
output: beamer_presentation
theme: Dresden
---
# R Markdown
This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.
# Slide with Bullets
- Bullet 1
- Bullet 2
- Bullet 3
# Slide with R Code and Output
```{r}
summary(cars)
```
# Slide with Plot
```{r, echo=FALSE}
plot(cars)
```
I think the slide_level option might be what you are looking for:
The slide_level option defines the heading level that defines individual slides. By default this is the highest header level in the hierarchy that is followed immediately by content, and not another header, somewhere in the document. This default can be overridden by specifying an explicit slide_level
documentation source
For example with the slide_level: 2:
---
title: "Example"
output:
beamer_presentation:
slide_level: 2
theme: Dresden
---
gives you the following output
However you need to provide a lower level of the heading for the slide title, e.g.
# R Markdown
## Description
This is an R Markdown presentation. Markdown is a simple formatting
syntax for authoring HTML, PDF, and MS Word documents. For more
details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a document will be generated that
includes both content as well as the output of any embedded R code
chunks within the document.
Edit To get the output same as in the image you have attached, you section your presentation in the following way:
---
title: "Example"
output:
beamer_presentation:
slide_level: 3
theme: Dresden
---
# Section 1
## Subsection 1
### Title A
### Title B
## Subsection 2
### Title A
## Subsection 3
### Title A
### Title B
### Title C
# Section 2
## Subsection 1
### Title A
### Title B
and the following presentation heading is generated: