# 隐藏带标签方程中的滚动条 - MathJax 包装

**URL:** https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300
**Category:** UX
**Tags:** math
**Created:** [2023年六月14日 12:56 UTC](https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300 "2023-06-14T12:56:58Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Wall-E](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wall-e/32/184438_2.png) [@Wall-E](https://meta.discourse.org/u/Wall-E)
#### Post date: [2023年六月14日 12:56 UTC](https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300/1 "2023-06-14T12:56:59Z")

</div>

标签方程（无论使用 Mathjax 还是 Katex）上会出现非常分散注意力的垂直或水平滚动条。例如，当我执行以下操作时：

$$\n\begin{equation}\nC(k,w) = \iint\_{-\infty}^{\infty} c(x,t)e^{-i2\pi(kx + wt)}dx \ dt \n\end{equation} \n$$

我得到：  
 ![Screenshot from 2023-06-14 08-55-06](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/4X/9/d/b/9dbfe3030e064a88dbbb2df34da490fc5444ab49.png)

无论我如何放大浏览器窗口，都无法摆脱它。  
当显然不需要滚动条来显示整个方程块时，我该如何摆脱它们？

我的数学设置目前是这样的：

 ![Screenshot from 2023-06-14 08-39-31](https://global.discourse-cdn.com/meta/original/4X/a/d/6/ad62026b36c6004bddd3db200b519644f52a2ee3.png)

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2023年六月14日 15:59 UTC](https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300/2 "2023-06-14T15:59:18Z")

</div>

> [@Wall-E](#):
>
> \begin{equation} C(k,w) = \iint\_{-\infty}^{\infty} c(x,t)e^{-i2\pi(kx + wt)}dx \ dt \end{equation}

你好 @Wall-E  
我尝试重现你的方程（我的 MathJax 设置和你一样），得到的结果没有滚动条：

```plaintext
$$
\begin{equation}
C(k,w) = \iint_{-\infty}^{\infty} c(x,t)e^{-i2\pi(kx + wt)}dx \ dt
\end{equation}
$$

```

 ![IMG_3514](https://global.discourse-cdn.com/meta/original/4X/9/e/6/9e62a63af9a8bc02f22d085d254520175d56591b.jpeg)

我在 Windows 桌面上使用了 Chrome，在 iOS 上使用了 Safari，包括桌面和移动视图。

你能提供更多细节吗？我似乎无法重现这个问题。

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2023年六月14日 16:06 UTC](https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300/3 "2023-06-14T16:06:44Z")

</div>

您是在说鼠标悬停时的缩放功能吗？也许应该改进换行功能或提供更多缩放比例选项…… 🤔

 ![mathjax](https://global.discourse-cdn.com/meta/original/4X/0/9/6/096e645e61297a310c2806964973e5de20be5bf6.png)

我还注意到，即使我输入了一个很长的、超出页面范围且没有换行的公式，我也从未收到滚动条，因此只能显示公式的一部分。

---

<div class="post-metadata">

### Author: ![Wall-E](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wall-e/32/184438_2.png) [@Wall-E](https://meta.discourse.org/u/Wall-E)
#### Post date: [2023年六月15日 14:55 UTC](https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300/4 "2023-06-15T14:55:52Z")

</div>

刷新页面时我可能遇到了一个故障，当时我同时测试了 Katex 和 Mathjax。我再次尝试使用 Mathjax，但方程标签/编号不再显示，与你的情况一样。滚动条仅在标签显示时出现，因此看起来与 Katex 有关。你可以在设置中将 Katex 设为默认值来重现此问题吗？

我不是在说缩放功能。我相信它也无法与 Katex 一起使用？

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2023年六月15日 15:19 UTC](https://meta.discourse.org/t/hiding-scrollbars-in-labelled-equations-mathjax-wrapping/268300/5 "2023-06-15T15:19:35Z")

</div>

哈哈哈。这是一个 KaTeX 的问题。而且 KaTeX 会给所有公式都添加滚动条，即使是那些不需要的短公式。但它也能让长公式不滚动（不像 MathJax）。

 ![math_katex](https://global.discourse-cdn.com/meta/original/4X/8/5/6/856e18636309b70431e65ef9de81d4632824d869.png)
