I have an online workbook for my students created using bookdown. The book has several math symbols. When I render a book chapter using preview_chapter()
function, the resulting HTML document shows all the math symbols correctly. However, when I build the book, all the math shows up as raw LATEX text. All the math shows up fine in the PDF copy. My _output.yml
looks like this:
bookdown::tufte_html_book:
toc: yes
toc_depth: 2
css:
- toc.css
- custom.css
tufte_variant: "envisioned"
config:
download: ["pdf", "epub"]
bookdown::pdf_book:
base_format: pdf_book
dev: "cairo_pdf"
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
Here are the screenshots with preview_chapter()
and after built.
All these things have failed:
- Using
mathjax: local
withself_contained: false
- Using
mathjax: CUSTOM LINK
where I used some other CDN host for mathjax.js - Opening the file in different browsers. Safari, Firefox, and Chrome all failed.
- Opening the file on a different OS. I use a Mac but I opened the rendered HTML on a Windows 7 machine and the problem persisted.
I will appreciate any help. Thanks!