MathJax 3 中的丹麦字母正在消失
Danish letters are disappearing with MathJax 3
我想在 MathJax 3 中使用字母 æ、ø 和 å 作为文本。
颜色 "red"、"green" 和 "blue" 拼写为 "rød"、"grøn" 和 "blå"
所以他们很难避免...
在图片中你可以看到丹麦字母消失了,当我写:
\text{grøn} \text{blå} etc
更新
scraaappy 的回答让我试了一下
src="https://cdn.jsdelivr.net/npm/mathjax@"@"3/es5/tex-mml-chtml.js"
而不是
src="https://cdn.jsdelivr.net/npm/mathjax@"@"3/es5/tex-svg-full.js"
现在丹麦字符出现了。
我的设置有些复杂,所以我将尝试使用 tex-svg-full.js
.
制作一个最小示例来说明问题
我注意到使用 tex-mml-chtml.js
时丹麦字母看起来很奇怪
所以我的理论是 MathJax 3 使用的 TeX 字体不包含丹麦字符 - 后备解决方案在 tex-mml-chtml.js
和 ``tex-svg-full.js`.
中的编码不同
这是使用 tex-mml-chtml.js
.
时显示丹麦语字符的示例
是否有 MathJax 2 使用的字体中的字母列表?
更新 2
一个最小的例子,不显示缺失的字符(在真实的
设置 MathJax 使用 MathJax.typesetClear()
后跟 MathJax.typeset()
呈现。该示例显示丹麦字符不在数学字体中。输出不漂亮。
这不是 MathJax 问题。没有更精确的答案很难回答,但如果你试图在 HTML 中显示,请检查你是否在 HTML5 and/or 中,如果你的字符集编码设置为 UTF-8
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
$$\text{grøn} $$
\(\text{grøn} \)
编辑
下面是我从第二个片段中获得的结果的屏幕截图(与您的 fiddle 相同)
这是你得到的吗?
在 reading the doc, the conclusion might be to use the unicode extension 之后让你选择自己的字体,或者用 \class
试试(我用它没有取得多大成功!)
.test{
color: red;
font-size: 2em;
letter-spacing: 15px;
line-height: 15px;
font-weight: bold;
}
<script >
MathJax = { tex: {packages: {'[+]': ['physics','unicode']},
inlineMath: [ ['$','$'], ["\(","\)"] ],
displayMath: [ ['$$','$$'], ["\[","\]"] ]},
svg: {scale: 100},
loader: {load: ['[tex]/physics','[tex]/unicode']},
styles: {".MathJax_SVG_Display":
{ "text-align": "center",
"margin": "0.25em 0em ! important"}}
};
</script>
<!-- Title -->
<title>Testing danish characters in MathJax 3 </title>
<h1> MathJax formula in original page. </h1>
\[ x aæbøcå y \unicode{0216} \]
\[ x aæbøcå y \unicode[Garamond]{0216} \]
\[ x aæbøcå y \unicode[Verdana]{0216} \]
\[ aæbøcå \class{test}{Ø} \]
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg-full.js">
</script>
我想在 MathJax 3 中使用字母 æ、ø 和 å 作为文本。
颜色 "red"、"green" 和 "blue" 拼写为 "rød"、"grøn" 和 "blå" 所以他们很难避免...
在图片中你可以看到丹麦字母消失了,当我写:
\text{grøn} \text{blå} etc
更新
scraaappy 的回答让我试了一下
src="https://cdn.jsdelivr.net/npm/mathjax@"@"3/es5/tex-mml-chtml.js"
而不是
src="https://cdn.jsdelivr.net/npm/mathjax@"@"3/es5/tex-svg-full.js"
现在丹麦字符出现了。
我的设置有些复杂,所以我将尝试使用 tex-svg-full.js
.
我注意到使用 tex-mml-chtml.js
时丹麦字母看起来很奇怪
所以我的理论是 MathJax 3 使用的 TeX 字体不包含丹麦字符 - 后备解决方案在 tex-mml-chtml.js
和 ``tex-svg-full.js`.
这是使用 tex-mml-chtml.js
.
是否有 MathJax 2 使用的字体中的字母列表?
更新 2
一个最小的例子,不显示缺失的字符(在真实的
设置 MathJax 使用 MathJax.typesetClear()
后跟 MathJax.typeset()
呈现。该示例显示丹麦字符不在数学字体中。输出不漂亮。
这不是 MathJax 问题。没有更精确的答案很难回答,但如果你试图在 HTML 中显示,请检查你是否在 HTML5 and/or 中,如果你的字符集编码设置为 UTF-8
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"></script>
$$\text{grøn} $$
\(\text{grøn} \)
编辑
下面是我从第二个片段中获得的结果的屏幕截图(与您的 fiddle 相同)
这是你得到的吗?
在 reading the doc, the conclusion might be to use the unicode extension 之后让你选择自己的字体,或者用 \class
试试(我用它没有取得多大成功!)
.test{
color: red;
font-size: 2em;
letter-spacing: 15px;
line-height: 15px;
font-weight: bold;
}
<script >
MathJax = { tex: {packages: {'[+]': ['physics','unicode']},
inlineMath: [ ['$','$'], ["\(","\)"] ],
displayMath: [ ['$$','$$'], ["\[","\]"] ]},
svg: {scale: 100},
loader: {load: ['[tex]/physics','[tex]/unicode']},
styles: {".MathJax_SVG_Display":
{ "text-align": "center",
"margin": "0.25em 0em ! important"}}
};
</script>
<!-- Title -->
<title>Testing danish characters in MathJax 3 </title>
<h1> MathJax formula in original page. </h1>
\[ x aæbøcå y \unicode{0216} \]
\[ x aæbøcå y \unicode[Garamond]{0216} \]
\[ x aæbøcå y \unicode[Verdana]{0216} \]
\[ aæbøcå \class{test}{Ø} \]
<script id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg-full.js">
</script>