Closed drfurtado closed 2 years ago
Can you confirm that you're using the latest version of xaringanExtra? use_search()
was added in 0.2.6
.
# install from my r-universe repo
install.packages("xaringanExtra", repos = c("https://gadenbuie.r-universe.dev", getOption("repos")))
# or from github
remotes::install_github("gadenbuie/xaringanExtra")
My apologies. Indeed, I was using an old version.
No worries, glad it's working for you now!
If you do not mind, I would like to ask a related question, now related to embed-xaringan
.
I am getting the following error when running the embed chunk: /chunk_output/s/3094A366/cbdj6quzf4tem/mct.html not found
mct.Rmd has the slides and the following:
---
title: "Chapter 04 - Measures of Central Tendency"
subtitle: "⚔<br/>Introduction to Statistics for Kinesiology Students"
author: "Furtado JR., O"
institute: "Cal State Northridge"
date: "updated: `r Sys.Date()`"
output:
xaringan::moon_reader:
lib_dir: libs
nature:
highlightStyle: github
highlightLines: true
countIncrementalSlides: true
---
```{r style-share-again, echo=FALSE}
xaringanExtra::style_share_again(
share_buttons = c("twitter", "linkedin")
)
isk-mct.embed.Rmd has the following:
---
title: "ISK-Measures of Central Tendency"
author: "Furtado Jr., O."
date: "9/22/2021"
output: html_document
---
```{r embed-xaringan, echo=FALSE}
xaringanExtra::embed_xaringan(url = "mct.html", ratio = "4:3")
There are two things that are (probably) going on there:
The url
for embed_xaringan()
needs to be a public URL to slides that are hosted online. If you're only ever embedding the slides locally you could use url = paste0("file://", normalizePath("mct.html"))
but the slides won't be embedded if you share the .html
file where they're embedded or put that file online.
The other thing that's happening is that html_document
sets self_contained: true
by default, which results in pandoc
trying to in-line the mct.html
file. For now you can add self_contained: false
to the html_document
options in the frontmatter. I'll open a separate issue to remind myself to make this unnecessary.
I am getting an error when adding a search option to my slides.
The error is Error: 'use_search' is not an exported object from 'namespace:xaringanExtra'
Any help is greatly appreciated.