简体   繁体   English

Doxygen 未在 markdown 文件中呈现 MathJax 公式

[英]Doxygen not rendering MathJax formulas in markdown file

As I understood, I should be able to write formulas with MathJax in the README.md if I create the HTML output of doxygen.据我了解,如果我创建 doxygen 的 HTML output,我应该能够在 README.md 中使用 MathJax 编写公式。 I set the following options for MathJax:我为 MathJax 设置了以下选项:

USE_MATHJAX       = YES
MATHJAX_FORMAT    = HTML-CSS
MATHJAX_RELPATH   = https://cdn.jsdelivr.net/npm/mathjax@2

I then tried the following in the markdown file for generating formulas:然后我在 markdown 文件中尝试了以下方法来生成公式:

\f(
    \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\f)


\f[
    \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\f]


\f{
    \sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
\f}


\f$ \sqrt{(x_2-x_1)^2+(y_2-y_1)^2} \f$

But I only get the following output:但我只得到以下output:

在此处输入图像描述

Is there something obviously off?有什么明显的不对吗? Are there other options I need to check in the Doxyfile?我还需要检查 Doxyfile 的其他选项吗?

The console showed that the CDN could not be reached due to the fact, that the internet connection in the virtual box suddenly stopped working.控制台显示无法访问 CDN,因为虚拟盒子中的互联网连接突然停止工作。 It may be better to have a local copy of MathJax to not run into similar issues.最好拥有 MathJax 的本地副本,以免遇到类似问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM