mavericks
mavericks

Reputation: 1165

Cross references between slides and their content

In an R markdown presentation with ioslides, is it possible to create cross-references between slides? This would be very helpful to create a manual table of contents or to quickly jump to content in an appendix at the end of the presentation.

MWE:

---
title: "Cross references between slides"
output:
  ioslides_presentation: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## Bullets with references

- Bullet 1: \ref{tab:my-table}
- Bullet 2: \ref{fig:my-plot}
- Bullet 3: \ref{appendix}

## Bullets with references (bookdown)

- Bullet 1: \@ref(tab:my-table)
- Bullet 2: \@ref(fig:my-plot)
- Bullet 3: \@ref(appendix)

## table

```{r my-table, cars, echo = TRUE}
library(kableExtra)
kable(summary(cars))
```

## plot

```{r my-plot, pressure}
plot(pressure)
```

## appendix

my appendix

Upvotes: 1

Views: 123

Answers (0)

Related Questions