1

我已将 MathJax 方程编号添加到我的 xaringan 幻灯片中,但\eqref{}(或\ref{})链接将我带回第一张幻灯片。我想禁用链接并从参考中删除链接着色。

我的.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>
4

1 回答 1

4

尝试将 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>
于 2018-07-28T00:06:00.273 回答