Skip to content

Preview shows MathJax rendered perfectly, but Readme in repo shows un-rendered #70

@Anirudh0616

Description

@Anirudh0616

I was writing a README.md for my project, which has some math equations. The handling of equations on GitHub's Readme portal is so bad, I don't understand how it works. I was happy when I found either a bug or a small fix where if I wrote the equation down like this

<p align="center">
</p>
$h(t)=\alpha e^{t\left(1-\tanh\left(2(t-\beta)\right)\right)}\sin(\gamma t)$

the markdown previewer showed the equation properly, even in dark mode (where GitHub often messes up). Now I was happy and pushed onto my project only to see that the Readme on the repo did not show the equations properly. I don't really understand whats happening here, but it may be some flaw with your handling of Markdown + JS.

One more thing, I understand that the paragraph tag is redundant, but if I remove that, the MathJax does not render properly in the markdown-previewer itself.

Weird.

Here are some images to understand better ( for the same code provided above )

How I see it on git-markdown-preview live server
Image

How GitHub Shows it
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions