在 xaringan 幻灯片中禁用 MathJax 方程参考 link
Disable MathJax equation reference link in xaringan slides
我已将 MathJax 方程编号添加到我的 xaringan 幻灯片,但 \eqref{}
(或 \ref{}
)link 将我带回到第一张幻灯片。我想禁用 link 并从参考中删除 link 着色。
我的.Rmd
---
title: "MathJax test"
output:
xaringan::moon_reader:
includes:
in_header: "mathjax-equation-numbers.html"
lib_dir: libs
---
\begin{align}
\bar{x} = \frac{1}{n}\sum_{i=1}^{10} x_i \label{my-eq}
\end{align}
An example of an equation is \eqref{my-eq}. Or \ref{my-eq}.
我在 mathjax-equation-numbers.html
文件中的解决方案尝试(无效):
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } },
"HTML-CSS": {
styles: {
".MathJax a": { color: "black",
"pointer-events": "none",
cursor: "default",
"text-decoration": "none"
},
".MathJax_Preview a": { color: "black",
"pointer-events": "none",
cursor: "default",
"text-decoration": "none"
},
}
}
});
</script>
尝试将 mathjax-equation-numbers.html 的内容替换为以下内容。
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } },
});
</script>
<style>
.mjx-mrow a {
color: black;
pointer-events: none;
cursor: default;
}
</style>
我已将 MathJax 方程编号添加到我的 xaringan 幻灯片,但 \eqref{}
(或 \ref{}
)link 将我带回到第一张幻灯片。我想禁用 link 并从参考中删除 link 着色。
我的.Rmd
---
title: "MathJax test"
output:
xaringan::moon_reader:
includes:
in_header: "mathjax-equation-numbers.html"
lib_dir: libs
---
\begin{align}
\bar{x} = \frac{1}{n}\sum_{i=1}^{10} x_i \label{my-eq}
\end{align}
An example of an equation is \eqref{my-eq}. Or \ref{my-eq}.
我在 mathjax-equation-numbers.html
文件中的解决方案尝试(无效):
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } },
"HTML-CSS": {
styles: {
".MathJax a": { color: "black",
"pointer-events": "none",
cursor: "default",
"text-decoration": "none"
},
".MathJax_Preview a": { color: "black",
"pointer-events": "none",
cursor: "default",
"text-decoration": "none"
},
}
}
});
</script>
尝试将 mathjax-equation-numbers.html 的内容替换为以下内容。
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } },
});
</script>
<style>
.mjx-mrow a {
color: black;
pointer-events: none;
cursor: default;
}
</style>