内联 mathjax 公式后出现不需要的断词

Dav*_*ven 5 markdown mathjax

我正在使用 Mathjax 将公式嵌入到 Jekyll 站点中,并使用 Kramdown 作为渲染器。

它工作得很好,只是在内联公式之后总是插入隐式分词符,这意味着换行可以在公式和标点符号之间插入换行符。这会导致这样的事情:

Where this fell down was that my representation was very limited as to what
numbers it can represent. The _smallest_ number possible was the integer `1`,
which represented $$\frac{1}{64} \approx 0.016$$; the _largest_ number was
the integer `127` (the top bit is used for the sign), which represented $$1
\frac{63}{64} \approx 1.98$$.
Run Code Online (Sandbox Code Playgroud)

...呈现如下:

在此输入图像描述

这看起来很糟糕。

有什么办法可以防止这种情况发生吗?

scr*_*ppy 2

使用\(...\)分隔符进行内联数学,而不是$$...$$将整个内容(带标点符号且没有空格)包裹在跨度标签中,这对我有用

Where this fell down was that my representation was very limited as to what
numbers it can represent. The _smallest_ number possible was the integer `1`,
which represented <span>\(\frac{1}{64} \approx 0.016\);</span> the _largest_ number was
the integer `127` (the top bit is used for the sign), which represented <span>\(1
\frac{63}{64} \approx 1.98\)..............</span>
Run Code Online (Sandbox Code Playgroud)

编辑:一个片段,说明了两个选项之间可能存在的差异(但同样,这取决于您的配置)

Where this fell down was that my representation was very limited as to what
numbers it can represent. The _smallest_ number possible was the integer `1`,
which represented <span>\(\frac{1}{64} \approx 0.016\);</span> the _largest_ number was
the integer `127` (the top bit is used for the sign), which represented <span>\(1
\frac{63}{64} \approx 1.98\)..............</span>
Run Code Online (Sandbox Code Playgroud)