Using mathjax: local in a bookdown project

19 Views Asked by At

The server where I house my bookdown html no longer permits external source calls, so the part of index.html at the end that seems to be the issue is

var src = "true";
    if (src === "" || src === "true") src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/latest.js?config=TeX-MML-AM_CHTML";

Following the bookdown instructions I added to the index.Rmd yaml header:

output:
  html_document:
    mathjax: local
    self_contained: false

However, the external mathjax reference persisted. To make a reproducible example, I created a bookdown skeleton using

bookdown:::bookdown_skeleton(getwd())

By default it includes the same external reference as above. Adding

output:
  html_document:
    mathjax: local
    self_contained: false

to the yaml header of index.Rmd or to the _output.yml section following bookdown::gitbook: (or both) does not install the local mathjax lib or remove the external reference from the html. Am I just putting that in the wrong place? I have used this process to remove external references from a Rmarkdown document and a website written in Rmarkdown successfully, but how to do this with my bookdown project has not been successful and I do not know why.

0

There are 0 best solutions below