1

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
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
mavericks
  • 1,005
  • 17
  • 42
  • Is this question the same as https://stackoverflow.com/q/66211476/1968, just beamer *vs* ioslides? Wouldn’t it make sense to join them and either search for a solution that works across output formats and/or works for at least one of them? – Konrad Rudolph Feb 15 '21 at 16:17
  • Yes, they are related. As I expected that solutions in each case could require hacks in LaTex/HTML respectively, I thought it would be better to keep them separate to keep the answers clean. If you believe there is a solution that works for both output formats I am happy to join both questions. – mavericks Feb 15 '21 at 16:23
  • To keep both questions distinctly different such that users can quickly find a solution for their purposes, would it be better to keep the type of slides (beamer/ioslides) in the title of each question as originally before editing the titles? Now both questions look identical. – mavericks Feb 15 '21 at 16:36
  • I love ioslides, but the lack of any kind of cross reference kills it for a lot of uses... @konrad-rudolph , have you checked with Yihui Xie if he has a solution? – GitHunter0 Apr 01 '21 at 14:07

0 Answers0