gpt4 book ai didi

markdown - 在 Typora 中显示数学符号

转载 作者:行者123 更新时间:2023-12-04 16:43:11 32 4
gpt4 key购买 nike

我阅读了 leetcode 的官方解决方案 reverse an integer

将以下内容复制到我的 Markdown 笔记后

enter image description here

但得到

enter image description here

我使用通常功能强大的typora。

为什么内容无法显示在网站上?

最佳答案

您正在复制的文本包含 katex , Typora 不支持.所以你应该使用 Latex 语法来呈现数学表达式。

在typora 中,您只需按$$ 和Return 键即可输入math block .但就您而言,您需要内联数学。按 command/ctrl + ,并确保检查内联数学。

screenshot image

要使用内联数学,请将您的内容放在 $.例如 $f(x)=x_{1}^{2}+x_{2}^{2}$结果

screenshot image

如果您在 Typora 中编写以下内容

To explain, lets assume that $\text{rev}$ is positive.

1. If $temp=rev\cdot10+pop$ causes overflow, then it must be that $rev\geq\frac{INTMAX}{10}$
2. If $rev>\frac{INTMAX}{10}$, then $temp=rev\cdot10+pop$ is guaranteed to overflow.
3. If $rev==\frac{INTMAX}{10}$, then $temp=rev\cdot10+pop$ will overflow if and only if $pop>7$

Similar logic can be applied when $\text{rev}$ is negative.

看起来像,

screenshot

这里 \cdot结果乘法点 ( ), \geq结果 \frac{}{}结果分数。

查看全部 Latex Math Symbolsdifference between dot characters .

关于markdown - 在 Typora 中显示数学符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55399071/

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