marp-core icon indicating copy to clipboard operation
marp-core copied to clipboard

Safari does not shrink down protruding KaTeX math block

Open yhatt opened this issue 5 years ago • 1 comments

In Safari, very long math block won't shrink down by auto-scaling in Marp Core.

<style>
svg { outline: 3px solid red; }
</style>

$$
f(x)=a+b+c+d+e+f+g+h+i+j+k+l
$$

$$
f(x)=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s
$$

$$
f(x)=a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z
$$
Safari Chrome Firefox
marp-bug-safari marp-bug-chrome marp-bug-firefox

As indicated by outlines for <svg>, DOM layout for auto-scaling don't protrude. Simply Safari's long-stucked bug over 11 years has affected to nested <foreignObject> rendering.

Curiously fitting header and code block won't protrude even in Safari. I suppose rendering of the complex contents may not be working.

yhatt avatar Apr 26 '20 08:04 yhatt

It seems to be fixed in MathJax math block (implemented in v1.2.0). We can close this in the near future, if MathJax rendering would be a primary option.

yhatt avatar Jun 08 '20 13:06 yhatt