MathJax equation does not fit the width of window when using mobile(使用移动设备时,MathJax 方程不适合窗口的宽度)
问题描述
在我的博文(与 Hugo 编译)中,我有 本节
在计算机屏幕上使用浏览器时,本节中的数学方程式可以很好地呈现,但是,当我在移动设备上查看时,方程式在中间被剪切,没有滚动选项.
In my blog post (compiled with Hugo) I have this section
The math equations in this section are presented well when using a browser on a computer screen, however, when I view this on mobile the equations are being cut in the middle with no scrolling option.
我想在移动设备上访问时仅调整这些方程式的大小以适应窗口,或者在需要时添加滚动选项.我怎样才能做到这一点?
I want to either resize only these equations to fit the window when accessed on mobile, or adding a scrolling option when it is needed. How can I achieve that?
我正在使用 Markdown 来写我的帖子.我已经尝试了很多东西,包括将此代码添加到我的降价文件中:
I am using Markdown to write my posts. I have tried a lot of things, including adding this code to my markdown file:
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
"HTML-CSS": {linebreaks: { automatic: true }}
})
</script>
但它不起作用.
推荐答案
有问题的方程式是表格环境,表格不能换行.
The problematic equations are tabular environments and tables cannot linebreak.
要获得滚动,您可以在页面中添加以下 CSS.
To gain scrolling, you can add the following CSS to your page.
.MathJax_Display, .MJXc-display, .MathJax_SVG_Display {
overflow-x: auto;
overflow-y: hidden;
}
顺便说一句,该页面使用的是古老版本的 MathJax -- cdn.mathjax.org 已于 3 年前有效关闭,不再获得更新.
By the way, the page is using an ancient version of MathJax -- cdn.mathjax.org was effectively shut down 3 years ago and no longer gets updates.
这篇关于使用移动设备时,MathJax 方程不适合窗口的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用移动设备时,MathJax 方程不适合窗口的宽度


- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 失败的 Canvas 360 jquery 插件 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01