"Undefined" Tabs included in RMarkdown tabsets?

Viewed 139

When I knit my RMarkdown document to an HTML file my tabs look like they do below:

enter image description here

However, when I save the document to share with my audience the file now includes these tabs that are marked as "undefined". To be clear, the issues occurs when I save the document locally to my computer.

enter image description here

Below is an example of my tabset logic

# Introduction {.tabset .tabset-fade .tabset-pills}
     
## Open Quotes  {.tabset .tabset-pills}
   
## Late Orders  {.tabset .tabset-pills}
1 Answers

I was able to reproduce the problem with following steps:

  1. knit document and generate test.html
---
title: "test"
output:
  html_document:
    self_contained: true
---

# Introduction {.tabset .tabset-fade .tabset-pills}
     
## Open Quotes  
   
## Late Orders  

  1. open test.html in browser enter image description here

  2. save test.html from browser to saved_from_browser.html

The browser creates :

  1. a new saved_from_browser.html file
  2. an associated directory saved_from_browser_files containing MathJax.js

The problem occurs if you open saved_from_browser.html without the associated directory (for example after deleting it) :

enter image description here

If you have access to the original test.html file, use it for sharing as it is self-contained.
If not, don't forget to supply the associated directory.

Related