Search code examples
rknitrmathjaxslidify

Specify multiple widgets in slidify


How can I specify two widgets in a slidify RMarkdown document? Given the following example:

---
title       : Test
subtitle    : 
author      : 
job         : 
framework   : io2012        # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js  # {highlight.js, prettify, highlight}
hitheme     : tomorrow      # 
widgets     : {mathjax, quiz} # {mathjax, quiz, bootstrap}
mode        : selfcontained # {standalone, draft}
---

## A fraction:

$\frac{1}{0}$

---&radio .quiz

## A quiz:

A or B?

1. A
2. _B_

I can't seem to get both the quiz and mathjax to be loaded. I've tried a few sample separators such as omitting the curly braces, a space, multiple widget statements, but I haven't managed to work it out.


Solution

  • The correct way to get multiple widgets in would be to use square brackets. Your widget line should read:

    widgets     : [mathjax, quiz]
    

    The documentation for slidify is still a little sparse, so a good source of answers is this repository by the author which has some very good examples.