gpt4 book ai didi

latex - 在 MathJax 中显示长除法符号 )‾‾‾‾‾‾ 的方法

转载 作者:行者123 更新时间:2023-12-01 23:08:43 28 4
gpt4 key购买 nike

有没有办法在 MathJax 中格式化长除法,使其看起来像这样:

     125     (Explanations)
4)500
4 (4 × 1 = 4)
10 (5 - 4 = 1)
8 (4 × 2 = 8)
20 (10 - 8 = 2)
20 (4 × 5 = 20)
0 (20 - 20 = 0)

但格式显然正确?

最佳答案

这是对维尔纳答案的修改,可以让你得到你想要的。它使用 MathJax 的封闭扩展来插入 MathML <menclose>处理长除法符号的元素。

$$
\require{enclose}
\begin{array}{rll}
125 && \hbox{(Explanations)} \\[-3pt]
4 \enclose{longdiv}{500}\kern-.2ex \\[-3pt]
\underline{4\phantom{00}} && \hbox{($4 \times 1 = 4$)} \\[-3pt]
10\phantom{0} && \hbox{($5 - 4 = 1$)} \\[-3pt]
\underline{\phantom{0}8\phantom{0}} && \hbox{($4 \times 2 = 8$)} \\[-3pt]
\phantom{0}20 && \hbox{($10 - 8 = 2$)} \\[-3pt]
\underline{\phantom{0}20} && \hbox{($4 \times 5 = 20$)} \\[-3pt]
\phantom{00}0
\end{array}
$$

结果是

enter image description here

关于latex - 在 MathJax 中显示长除法符号 )‾‾‾‾‾‾ 的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22867785/

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