Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression] Auto-scaling for KaTeX block is always enable regardless of @auto-scaling theme metadata #353

Closed
yhatt opened this issue Sep 9, 2023 · 0 comments · Fixed by #354
Labels
bug Something isn't working

Comments

@yhatt
Copy link
Member

yhatt commented Sep 9, 2023

Version of Marp Tool

Marp Core v3.8.0

Operating System

Other (fill out in the environment field)

Environment

  • Node.js version (Marpit / Marp Core/ Marp CLI): v18.17.0

How to reproduce

Put the theme and Markdown into sandbox directory in Marp Core repository:

/* @theme test */

section {
  background: #fff;
}
---
theme: test
math: katex
---

# Auto-scaling for KaTeX <!--fit-->

$$
{1 + \frac{q^2}{(1-q)} + \frac{q^6}{(1-q)(1-q^2)} + \frac{q^{12}}{(1-q)(1-q^2)(1-q^3)} + \frac{q^{20}}{(1-q)(1-q^2)(1-q^3)(1-q^4)} + \frac{q^{30}}{(1-q)(1-q^2)(1-q^3)(1-q^4)(1-q^5)}} + \frac{q^{42}}{(1-q)(1-q^2)(1-q^3)(1-q^4)(1-q^5)(1-q^6)} + \frac{q^{56}}{(1-q)(1-q^2)(1-q^3)(1-q^4)(1-q^5)(1-q^6)(1-q^7)} + \frac{q^{72}}{(1-q)(1-q^2)(1-q^3)(1-q^4)(1-q^5)(1-q^6)(1-q^7)(1-q^8)} + \frac{q^{90}}{(1-q)(1-q^2)(1-q^3)(1-q^4)(1-q^5)(1-q^6)(1-q^7)(1-q^8)(1-q^9)} + \cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
$$

And run yarn sandbox.

Expected behavior

Math block should not scale down to fit the slide, because the custom theme is not defined @auto-scaling metadata.

Actual behavior

Math block is scaling down to fit the slide.

Additional information

Reported in https://github.com/orgs/marp-team/discussions/159#discussioncomment-6955411.

This regression has been present since v3.0.0. In that version, the new auto-scaling component was produced, but the auto-scaling metadata was not taken into account.

Other scaling elements such as <!--fit--> are still following @auto-scaling correctly. In above example, <!--fit--> in the heading is just ignored by the theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant