Some math equations do not render correctly
// Please enter a detailed description of the issue // Description of the issue:
Some math equations containing tow or more _{} do not render correctly.
$$f_{y}(x)$$ ok $$f_{y}(x) g_{y}(x)$$ does not render, which is acceptable syntax in MathJax.
// Please enter a list of steps required to reproduce the issue // Steps to reproduce:
- Type $$f_y(x) g_y(x)$$
- Change to $$f_{y}(x) g_{y}(x)$$
- Try some complex formular from MathJax.org, such as
$$\sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N (x_i -\mu)^2}$$ not working. - Remove some part $$\sigma = \sqrt{ \frac{1}{N} \sum_{i=1}^N}$$
- test.md 995 Bytes
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 10 Jul, 2021 12:24 PM
It looks like you left out all of the configuration info I would need to diagnose the issue.
- Brett
2 Posted by beeven on 15 Jul, 2021 08:53 AM
My configuration is as followed. Sorry for the inconvenience.
It seems some underscores in between $$ are parsed as and carets as .
// Configuration (do not edit) Marked 2 1022 (Mac App Store)
macOS Version: 12.0
additionalMathJaxConfig:
allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 0
defaultProcessor: Discount (GFM)
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: YES
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES
Support Staff 3 Posted by Brett on 15 Jul, 2021 12:10 PM
Do you have the same issue using the MultiMarkdown processor
(Preferences->Processor)?
-Brett
4 Posted by beeven on 17 Jul, 2021 09:22 AM
Switching to MultiMarkdown processor solves the problem. Thank you!
There is just a tiny issue with large square root symbol. No glitch if KaTeX is used instead of MathJax.
Support Staff 5 Posted by Brett on 17 Jul, 2021 11:54 AM
Glad to hear that's a good fix for you. I'm afraid the GFM processor
doesn't avoid rendering underscores as italics inside of equations as
well as it should.
I'm very inexperienced with MathJax (and KaTeX), honestly, so I can't
offer a lot of troubleshooting with the smaller quirks. If there's
something you think Marked's version of Mathjax is doing wrong that it
shouldn't be, though, let me know. If it works elsewhere but not in
Marked, I can look into why that would be.
-Brett