gpt4 book ai didi

LaTeX 数学模式和 mbox 模式

转载 作者:行者123 更新时间:2023-12-04 00:45:48 25 4
gpt4 key购买 nike

根据我发现的文档

An \mbox within math mode does not use the current math font; rather it uses the typeface of the surrounding running text.



在数学模式下,我想写一些类似 a_{\mbox{foo}} 的东西。如果我使用这个,foo 会很大,太大了。如果我写 a_{foo},foo 将为斜体。

拥有非斜体的小文本的魔术是什么?

最佳答案

我个人更喜欢使用 \text{} AMS-LaTeX package 提供的命令.要使用它,您需要包含语句

\usepackage{amsmath}

在你的文档序言中的某个地方,然后在任何数学环境中,
a_{\text{foo}}

将产生所需的输出。 User’s Guide for the amsmath Package第6条提到 \mbox{}等价的是
a_{\mbox{\scriptsize foo}}

最后一个选择是
a_{\mathrm{foo}}

这是我在发现 AMS-LaTeX 和 \text{} 之前使用的命令。

关于LaTeX 数学模式和 mbox 模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1239786/

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