rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
18.44k stars 1.65k forks source link

MathJax does not work together with MermaidJS #1007

Open kuznero opened 5 years ago

kuznero commented 5 years ago

Here is an example boot.toml:

[book]
authors = ["Roman Kuznetsov"]
language = "en"
multilingual = false
src = "src"
title = "Coursera: Data Structures and Algorithms"

[build]
create-missing = false
use-default-preprocessors = true  # enables the "links" preprocessor

# NOTE: as of now MathJax does not seem to work nicely with MermaidJS (so, choosing MathJax for now)

# [preprocessor.mermaid]
# command = "mdbook-mermaid"
# renderer = ["html"]

[output.html]
# additional-css = ["assets/mermaid.css", "assets/override.css", "assets/lightfair.css"]
additional-css = ["assets/override.css", "assets/lightfair.css"]
# additional-js = ["assets/mermaid.min.js", "assets/mermaid-init.js"]
mathjax-support = true
theme = "assets"

[output.html.playpen]
editable = true

[output.html.search]
limit-results = 20
use-boolean-and = true
boost-title = 2
boost-hierarchy = 2
boost-paragraph = 1
expand = true
heading-split-level = 2
JoshOrndorff commented 4 years ago

Have you gotten mermaid to work on its own? I'm facing an issue that js files in a location other than the root don't work. What if you move mermaid out of the assets directory? https://github.com/substrate-developer-hub/recipes/pull/54