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.11k stars 1.63k forks source link

mdBook doesn't support `mathcal` symbols #2284

Open HouJP opened 10 months ago

HouJP commented 10 months ago

Problem

mdBook cannot render mathcal symbols correctly, e.g., \mathcal{X}.

Steps

Type the following line in a .md file.

For example, \\( \mathcal{X} \\).

Then, run mdbook serve and observe the output.

Possible Solution(s)

No response

Notes

No response

Version

No response

HouJP commented 10 months ago

Interesting, I found the solution. Hope it helps others.

HouJP commented 10 months ago

It seems that it would be better to update the website configuration to switch to the CommonHTML or SVG output instead of HTML-CSS output to fix this issue globally?

HouJP commented 10 months ago

Here is the solution to update the js to the CommonHTML or SVG output.

A general idea to fix this issue is to introduce a HtmlConfig field named mathjax_config to support setting different configuration files used by MathJax, and set the default value of this field to TeX-AMS-MML_HTMLorMML to be consistent with the previous releases. WDYT?