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

mdformat breaks LaTeX formulas #368

Closed
jim-max opened this issue Nov 24, 2022 · 4 comments
Closed

mdformat breaks LaTeX formulas #368

jim-max opened this issue Nov 24, 2022 · 4 comments
Labels
question Further information is requested

Comments

@jim-max
Copy link

jim-max commented Nov 24, 2022

Context

When I have an .md file with the following content:

a formula:
$$ 
\sum^{n}_{k=0} k = \frac{n (n+1)}{2}
$$
an inline formula $a^2 + b^2 = c^2$. 

and I run mdformat, it returns:

a formula:
\$$
\sum^{n}_{k=0} k = \frac{n (n+1)}{2}
$$
an inline formula $a^2 + b^2 = c^2\$.

note the extra \ at the $-symbols.
Sadly, this breaks the LaTeX-formulas in our documentation.

Thanks a lot!

Proposal

I would expect that there is some mechanism to keep the LaTeX-formulas as they are (maybe related to #359).

Tasks and updates

No response

@jim-max jim-max added the enhancement New feature or request label Nov 24, 2022
@welcome
Copy link

welcome bot commented Nov 24, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@hukkin hukkin added question Further information is requested and removed enhancement New feature or request labels Nov 24, 2022
@hukkin
Copy link
Member

hukkin commented Nov 24, 2022

Hi there!

Please see #334 and #325

@hukkin hukkin closed this as completed Nov 24, 2022
@hukkin
Copy link
Member

hukkin commented Nov 24, 2022

Installing mdformat-myst should bring support for the syntax you use.

@arwedus
Copy link

arwedus commented Oct 2, 2023

@hukkin : we have mdformat-myst installed and the problem is still the same.
@jim-max forgot to list our pip packages, here they go:

mdformat==0.7.17
mdformat-gfm==0.3.5
mdformat_frontmatter==2.0.1
mdformat_myst==0.1.5
mdformat_tables==0.4.1

Can you have a second look at the problem, please?
Or is there something that fixes it in the mean time?
p.s.: It does not matter whether mdformat-gfm is installed or not.

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

No branches or pull requests

3 participants