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

Math errors with newlines and standalone $'s #91

Closed
danielwe opened this issue Aug 29, 2019 · 0 comments
Closed

Math errors with newlines and standalone $'s #91

danielwe opened this issue Aug 29, 2019 · 0 comments

Comments

@danielwe
Copy link
Contributor

  • Newlines \\ within math environments are replaced by single backslashes:
$$
\begin{matrix}
  a & b \\
  c & d
\end{matrix}
$$

renders to

$$
\begin{matrix}
a & b \
c & d
\end{matrix}
$$

I.e., the substitutions \ -> <br> and \\ -> \ are performed even inside math environments, resulting in incorrect math expressions after MathJax processing.

  • Dollar signs that are clearly not math environment delimiters are treated as such:
I earned $10 and spent $5.

10 and spent is processed as math by MathJax. (Note, for example, that pandoc defines rules for when a pair of dollar signs should be treated as a math environment, see https://pandoc.org/MANUAL.html#math).

One solution could be to use the markdown-it-mathjax plugin, which takes care of all of this. However, that appears to require enabling the '\\(','\\)' inline math delimiters, which were disabled in #14.

danielwe added a commit to danielwe/markserv that referenced this issue Sep 7, 2019
@F1LT3R F1LT3R closed this as completed in b6c1ec7 Dec 28, 2019
franzinc pushed a commit to e40/markserv that referenced this issue Jun 25, 2020
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

1 participant