gpt4 book ai didi

mathjax - 在语句的同一行显示 MathJax 表达式

转载 作者:行者123 更新时间:2023-12-02 14:27:50 26 4
gpt4 key购买 nike

查看代码片段

<div id="MathOutput" class="output">What will be the output of  $${x^2}$$</div>

这会在一行上显示字符串“What will be the output of”,并在第二行上显示表达式 enter image description here

如何让表达式连续显示在行旁边?

最佳答案

使用$x^2$\(x^2\)而不是$$x^2$$。单美元用于内联数学方程,双美元用于在单独行上显示的方程。

MathJax 默认情况下不启用单美元,因此如果您想使用它们,则需要将它们包含在您的 tex2jax block 的 inlineMath 数组中。 MathJax 配置。请参阅tex2jax documentation了解详情。

关于mathjax - 在语句的同一行显示 MathJax 表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26398169/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com