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

Latex Equation renders inconsistently #2302

Open
1 task done
j0m0k0 opened this issue Mar 17, 2025 · 1 comment
Open
1 task done

Latex Equation renders inconsistently #2302

j0m0k0 opened this issue Mar 17, 2025 · 1 comment

Comments

@j0m0k0
Copy link

j0m0k0 commented Mar 17, 2025

Checklist

How did you create the site?

Generated from chirpy-starter

Describe the bug

The latex code I'm rendering using MathJax, runs correctly in the first render, then it will not render correctly. I guess it can be a cache problem. Any quick fix to avoid the caching is appreciated.

Sample code:

Hey this is a latex equation:
$$\begin{equation}
\{ x \mid x \text{ satisfies } P \}.
\label{eq:my_equation}
\end{equation}
$$

Steps To Reproduce

  1. Create a new post with math: true and use the sample code as the content.
  2. Render the page in the browser using (CMD/Control + Shift + R), everything should look fine.
  3. Refresh the page using F5 or browser's refresh button, the rendered equation is not centered and numbered anyome.

Expected Behavior

What I expected to see in step 3:

Image

What I actually see in step 3:

Image

You can see that the equation is not aligned center anymore and also there is no numbering on the right side.

Environment

  • Ruby: ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [arm64-darwin24]
  • Jekyll: jekyll 4.4.1
  • Chirpy: jekyll-theme-chirpy (7.2.4)

Anything else?

Any quick fix would be appreciated <3

@huanyushi
Copy link
Contributor

Can't reproduce your problem. By the way, you should add a blank line between the formula and the text.

Hey this is a latex equation:

$$
\begin{equation}
\{ x \mid x \text{ satisfies } P \}.
\label{eq:my_equation}
\end{equation}
$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants