【问题标题】:MathJax doesn't convert \bfMathJax 不转换 \bf
【发布时间】:2014-08-26 07:54:19
【问题描述】:

这是我的 JS 部分

<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    displayAlign: "center",
    extensions: ["tex2jax.js"],
    menuSettings: {
        zoom: "Click",
        CTRL: false,
        ALT: false,
        CMD: false,
        Shift: false,
        zscale: "250%",
        font: "Auto",
        context: "MathJax",
        mpContext: false,
        mpMouse: false,
        texHints: true
    },
    TeX: {
        Macros: {
          RR: '{\\bf R}',
          bold: ['{\\bf #1}', 1]
        }
    },
    errorSettings: {
        message: ["[", ["MathProcessingError", "Math Processing Error"], "]"],
        style: {
            color: "#CC0000",
            "font-style": "italic"
        }
    },
    jax: ["input/TeX", "output/SVG"],
    tex2jax: {
        inlineMath: [
            ['$', '$'],
            ['\\(', '\\)']
        ],
        displayMath: [
            ['$$', '$$'],
            ['\\[', '\\]']
        ],
        preview: ["[math]"],
        processEscapes: true
    },
    "SVG": {
        blacker: 10,
        font: "TeX",
        scale: 100,

    },
    MathMenu: {
        delay: 150,
        helpURL: "http://www.mathjax.org/help-v2/user/",
        showRenderer: true,
        showMathPlayer: true,
        showFontMenu: true,
        showContext: false,
        showDiscoverable: true,
    }
});
</script>

如您所见,我已经用 TexMacros 以及 \bf 将那部分放在了那里。这是我的显示文本

<p>
Nachr. {\bf 28} (1964), 1--43.
</p>

但它不使用 \bf 解析该部分。当然,当我在文本中有另一个乳胶部分时,它可以毫无问题地转换,这就是将 \bf 转换为特定输出的问题。

有什么帮助吗?谢谢

【问题讨论】:

  • 你试过\textbf{28}吗?
  • 不,它没有帮助。如果当前文本介于 $...$ 之间,则可以,但仍然可以。由于 ['\(', '\)'] @AlexisPigeon 它应该给出正确的输出

标签: latex mathjax tex


【解决方案1】:

MathJax 仅在数学模式下处理材料,而不是文本模式。由于您的 {\bf 28} 未处于数学模式,MathJax 看不到它。

您需要使用 HTML 标签在文本中进行标记。你应该使用

<p>
Nachr. <b>28</b> (1964), 1&#x2013;43.
</p>

为此。像这样让 MathJax 处理文本模式宏超出了 MathJax 的设计范围。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-18
    • 2011-12-23
    • 1970-01-01
    • 1970-01-01
    • 2013-04-07
    • 2012-04-15
    • 1970-01-01
    相关资源
    最近更新 更多