JohannesNE
JohannesNE

Reputation: 1363

RMarkdown ioslides - Slide number does not show in browser

I'm making a slideshow in RStudio using RMarkdown and exporting to ioslides. This works fine in the RStudio preview window, but when i open the html file in my browser (Chrome Version 45.0.2454.85 m (64-bit)), the slide number (n/total) is not displayed, only the "/". (Also, code highlights shown as just bold).

This happens even if i use the example slides in RStuido.

Any suggestions on how to fix this?

Edit: I think it happens with every document, but here is one example, that doesn't show page numbers in the browser:

---
title: "test"
author: "JohannesNE"
date: "28. sep. 2015"
output: ioslides_presentation
---

## 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>.

Upvotes: 6

Views: 1083

Answers (1)

hrbrmstr
hrbrmstr

Reputation: 78792

It's a security error in Chrome.

One workaround is to build the slides, then do either:

Rscript -e 'servr::httd()' -p9999

or

python -m SimpleHTTPServer 9999 

in the directory of the slide HTML file then browse to http://localhost:9999/test.html.

That should show the #'s and avoid the security error issue until the RStudio folks can find a way to adapt the HTML to meet Chrome's security requirements.

NOTE that this was fixed on October 1, 2015 - https://github.com/rstudio/rmarkdown/commit/718e101d8bc095e50d25170ae0a9804c2dd1b18e (thus this workaround is no longer needed if you use what is now the github version but will soon be the CRAN version of rmarkdown).

Upvotes: 3

Related Questions