提问人:Understanding 提问时间:11/16/2023 更新时间:11/16/2023 访问量:23
如何在网站中正确设置 MathJax?HTML代码失败?
How to properly set MathJax in a website? HTML code failed?
问:
早上好。我知道我要问一个乏味的问题,这个问题已经问过好几次了。我检查,我阅读,我尝试了我能做的,但结果仍然是一样的:失败。
我需要在(大学)网站上使用数学模式,以便为我正在教授的课程创建一系列问题(数学测试)。问题是,尽管有 HTML 框,但我为了生成数学模式而尝试的尝试并没有成功。
让我举个例子:我在另一页(另一位教授)中检查了一下,他使用数学模式进行了类似的测试。在他的测试中,方程输出得很好。我“窥探”了(不是真的)他在 HTML 部分编写的代码,这对我来说看起来一团糟。但我不太了解 HTML。
所以这里是输出:
“Sia $f: \mathbb{R}\to \mathbb{R}$ una funzione iniettiva e sia noto che $f(0) = 0$.Indicare l'affermazione corretta.”
($f$ 一个注入函数,使得 $f(0)= 0$。在以下几点中指出正确的陈述。
这是 HTML:
<p dir="ltr" style="text-align: left;">Sia <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax" id="MathJax-Element-1-Frame" tabindex="0" style="position: relative;" data-mathml="<math xmlns="http://www.w3.org. /1998/Math/MathML"><mi>f</mi><mo>:</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="double-struck">R</mi></mrow><mo stretchy="false">&#x2192;</mo><mrow class="MJX-TeXAtom-ORD"><mi mathvariant="double-struck">R</mi></mrow></math>" role="presentation">
<nobr aria-hidden="true"><span class="math" id="MathJax-Span-1" style="width: 5.548em; display: inline-block;"><span style="display: inline-block; position: relative; width: 4.373em; height: 0px; font-size: 126%;"><span style="position: absolute; clip: rect(1.722em, 1004.34em, 2.927em, -1000em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-2"><span class="mi" id="MathJax-Span-3" style="font-family: STIXGeneral; font-style: italic; text-rendering: optimizelegibility;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.146em;"></span></span><span class="mo" id="MathJax-Span-4" style="font-family: STIXGeneral; padding-left: 0.313em;">:</span><span class="texatom" id="MathJax-Span-5" style="padding-left: 0.313em;"><span class="mrow" id="MathJax-Span-6"><span class="mi" id="MathJax-Span-7" style="font-family: STIXGeneral;">ℝ</span></span></span><span class="mo" id="MathJax-Span-8" style="font-family: STIXGeneral; padding-left: 0.313em;">→</span><span class="texatom" id="MathJax-Span-9" style="padding-left: 0.313em;"><span class="mrow" id="MathJax-Span-10"><span class="mi" id="MathJax-Span-11" style="font-family: STIXGeneral;">ℝ</span></span></span></span><span style="display: inline-block; width: 0px; height: 2.56em;"></span></span></span><span style="display: inline-block; overflow: hidden; vertical-align: -0.328em; border-left: 0px solid; width: 0px; height: 1.249em;"></span></span></nobr><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>f</mi>
<mo>:</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">R</mi>
</mrow>
<mo stretchy="false">→</mo>
<mrow class="MJX-TeXAtom-ORD">
<mi mathvariant="double-struck">R</mi>
</mrow>
</math></span>
</span>
<script type="math/tex" id="MathJax-Element-1">f:\mathbb{R}\rightarrow\mathbb{R}</script> una funzione iniettiva e sia noto che <span class="MathJax_Preview" style="color: inherit; display: none;"></span><span class="MathJax" id="MathJax-Element-2-Frame" tabindex="0" style="position: relative;" data-mathml="<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>f</mi><mo stretchy="false">(</mo><mn>0</mn><mo stretchy="false">)</mo><mo>=</mo><mn>0</mn></math>" role="presentation">
<nobr aria-hidden="true"><span class="math" id="MathJax-Span-12" style="width: 4.322em; display: inline-block;"><span style="display: inline-block; position: relative; width: 3.413em; height: 0px; font-size: 126%;"><span style="position: absolute; clip: rect(1.722em, 1003.39em, 2.927em, -1000em); top: -2.56em; left: 0em;"><span class="mrow" id="MathJax-Span-13"><span class="mi" id="MathJax-Span-14" style="font-family: STIXGeneral; font-style: italic; text-rendering: optimizelegibility;">f<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.146em;"></span></span><span class="mo" id="MathJax-Span-15" style="font-family: STIXGeneral;">(</span><span class="mn" id="MathJax-Span-16" style="font-family: STIXGeneral;">0</span><span class="mo" id="MathJax-Span-17" style="font-family: STIXGeneral;">)</span><span class="mo" id="MathJax-Span-18" style="font-family: STIXGeneral; padding-left: 0.313em;">=</span><span class="mn" id="MathJax-Span-19" style="font-family: STIXGeneral; padding-left: 0.313em;">0</span></span><span style="display: inline-block; width: 0px; height: 2.56em;"></span></span></span><span style="display: inline-block; overflow: hidden; vertical-align: -0.328em; border-left: 0px solid; width: 0px; height: 1.249em;"></span></span></nobr><span class="MJX_Assistive_MathML" role="presentation"><math xmlns="http://www.w3.org/1998/Math/MathML">
<mi>f</mi>
<mo stretchy="false">(</mo>
<mn>0</mn>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mn>0</mn>
</math></span>
</span>
<script type="math/tex" id="MathJax-Element-2">f(0)=0</script>. Indicare l'affermazione corretta:<br>
这显然让我感到惊讶。
我尝试使用MathJax网站上的一些示例,它们不起作用。
我真的不知道该怎么办。尽管我阅读并尝试了,但数学模式不起作用。
谁能给我一些帮助?
谢谢!
答:
评论