Here is a minimal example that reproduces the problem.
The problems are that when you knit this as slidy_presentation2, the hyperlink to Eq (1) and Theorem 1, doesn't work on the first page, but does work on the second page, because the equation and theorem is on the second page, but not the first. And the reference to the second page (secname) doesn't work anywhere, it appears as ??.
But if you knit this as html_document2. Everything works.
Is there a way to fix this?
(Replace \``` with
``` )
---
title: Refs dont work
output:
bookdown::slidy_presentation2: default
bookdown::html_document2: default
---
## First page
Equation reference is \@ref(eq:ff). Theorem reference is \@ref(thm:prob). Section
reference is \@ref(secname)
## Second page {#secname}
\begin{equation}
f(x) = x+1 (\#eq:ff)
\end{equation}
\```{theorem prob}
My theorem is $P(A)=1/2$.
\```
\```{r}
matrix(1:50,c(50,1))
\```
Equation reference is \@ref(eq:ff). Theorem reference is \@ref(thm:prob). Section
reference is \@ref(secname)