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

FR: mathjax linter #1174

Open
conneroisu opened this issue Sep 27, 2024 · 3 comments
Open

FR: mathjax linter #1174

conneroisu opened this issue Sep 27, 2024 · 3 comments
Labels
math Relates to math support in markdown rule suggestion Suggestion to add or edit a rule

Comments

@conneroisu
Copy link

conneroisu commented Sep 27, 2024

Is Your Feature Request Related to a Problem? Please Describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when my mathjax get's messy in my notes.

Describe the Solution You'd Like

A clear and concise description of what you want to happen.

Please include an example where applicable:
Ex 1:

$$
\text{Hello}
$$

Becomes

$$\text{Hello}$$

Ex 2:

$$\begin{gathered} s^2 Y(s)+s y(s)+5 Y(s)=s^2 X(s)-2 \times X(s)+X(s) \\ H(s)=\frac{Y(s)}{X(s)}=\frac{s^2-2 s+1}{s^2+s+5} \end{gathered} $$

Becomes

$$\begin{gathered} s^{2} Y(s)+s y(s)+5 Y(s)=s^{2} X(s)-2 \times X(s)+X(s) \\ H(s)=\frac{Y(s)}{X(s)}=\frac{s^{2}-2 s+1}{s^{2}+s+5}\end{gathered}$$

Describe Alternatives You've Considered

A clear and concise description of any alternative solutions or features you've considered.
similar solutionto https://github.com/conneroisu/mathjax-linter

Additional Context

Add any other context or screenshots about the feature request here.
I would be willing to create a pr if this feature is determined to be in scope.

@conneroisu conneroisu added the rule suggestion Suggestion to add or edit a rule label Sep 27, 2024
@pjkaufman
Copy link
Collaborator

Hey @conneroisu . I am not sure I fully follow what is going on in the above and what Linter rules are being proposed. I am definitely open to math rules being added, I just want to make sure I understand exactly what is being proposed.

The first example provided has me a bit wary because it conflicts with the rule to move math block indicators onto their own lines. However, so long as the math format in question abides by the format that remark's math parser understands, I am willing to consider the math rules.

So if you could elaborate a little more on what exactly you are hoping the format for math blocks (inline or regular) would be, that would be very helpful in understanding which desired math formatting rules would be accepted and which do not fall under the remark math spec which would cause other logic to fail.

@pjkaufman
Copy link
Collaborator

I am not seeing the spec well from what I am seeing, but I think some of it lives on this page. But it works kind of like inline code and code blocks. So there is no ability to have text after the ending indicator for multiline math blocks. Also, if I recall it expects there to be some kind of content between two math blocks. Otherwise they are considered to be the same. So keep that in mind.

I am definitely willing to help with any questions or feedback around the development process.

@pjkaufman pjkaufman added the math Relates to math support in markdown label Sep 27, 2024
@pjkaufman
Copy link
Collaborator

pjkaufman commented Sep 27, 2024

If it helps, here is a previous issue around adding formatting to math blocks: #261. I meant to get to it, but other priorities came up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
math Relates to math support in markdown rule suggestion Suggestion to add or edit a rule
Projects
None yet
Development

No branches or pull requests

2 participants