-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
Weird behaviours in math plugin #330
Comments
Also, block math is not allowing multiline content. The following does not work:
The workaround is to write everything in a single line like
|
I changed the patterns in BLOCK_MATH_PATTERN = r'(?sm)(?!^ {4,})\$\$\s*(?P<math_text>\S.*?)\s*(?<!\\)\$\$'
INLINE_MATH_PATTERN = r'\$\s*(?P<math_text>\S.*?)\s*(?<!\\)\$' These seem to fix the issues above except The patterns disallow empty formulas to avoid ambiguity, and formulas made only from whitespace. |
@miguelbarao I've fixed block math plugin for multiline content. |
@lepture Thank you. Still, it does not address some of the issues reported above:
should render Will mistune force |
I was checking the math plugin and found out four incompatibilities with latex compilers (pdfLaTeX and XeLaTeX) and MathJax:
$$
) requires a newline before and after content, effectively changing the delimiters to$$\n
and\n$$
.$$$$
), the regex is done with.+
instead of.*
.\$
).So the following markdown:
Is compiled to:
Whereas it should probably be:
For comparison, here are the latex and MathJax versions:
Latex version
Code:
Output:
MathJax version
Code:
Output:
The text was updated successfully, but these errors were encountered: