Trouble rendering LaTeX sums, in $$ / $$ block.

David Banas's Avatar

David Banas

10 Oct, 2017 11:31 PM

// Please enter a detailed description of the issue // Description of the issue: I can’t seem to make standard LaTeX sum syntax work, in a $$ / $$ block, but it does work in an inline $ / $ segment.

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. Enter the text, below, into a *.md file
  2. Attempt to view the file in Marked2.

// If applicable please attach a sample document that causes the issue for you.

$Y_{0,0} = \sum_{m=0}^2 x$

$$ Y_{0,0} = \sum_{m=0}^2 x
$$

// Configuration (do not edit) Marked 2 930 (Direct)

OS X Version: 10.11.6

additionalMathJaxConfig:
allowPageBreakInCode: 1
bookTxtIsLeanpub: 0
summaryMdIsGitBook: 0
codeIsPoetry: 0
collapsibleHeadlines: 0
convertGithubCheckboxes: 1
convertYAMLToMMD: 0
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: GitHub
defaultProcessor: MultiMarkdown
enableMiniMap: 0
excludeBlockQuotesFromCounts: 0
excludeFootnotesFromCounts: 0
excludeVerbatimFromCounts: 0
excludeCaptionsFromCounts: 0
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: 0
h1IsPageBreak: 0
h2IsPageBreak: 0
hrIsPageBreak: 0
includeMathJax: 1
limitTextWidth: 0
minimalJavaScript: 0
outlineModeExtensions:
permissionGranted: 0
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFooterFirstPage: 0
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: 1
removeMetadataForPreview: 0
removeYAMLHeaders: 0
scrollToEdit: 0
shouldDetectCritic: 1
shouldHighlightMarkupErrors: 0
shouldLoadCritic: 0
syntaxHighlight: 1

  1. Support Staff 1 Posted by Brett on 11 Oct, 2017 03:51 PM

    Brett's Avatar

    There are several reasons this can get complex.

    1. If you have "retain line breaks in paragraphs" enabled in Processor preferences, it's adding a <br> that breaks the equation
    2. The $$ delimiter isn't standard for MultiMarkdown or default MathJax configuration. You'll have to ensure that you have this configuration added.
    3. It can work if you remove the spaces and line breaks around delimiters, even if #1 is true:

      $$mY_{0,0} = \sum_{m=0}^2 x$$
      
    4. With a couple of possible setups, the markdown characters (in this case _ and ^) will get rendered before Mathjax gets hold of it, so they need to be escaped:

      $$
      mY\_{0,0} = \sum\_{m=0}\^2 x
      $$
      

    Let me know if this helps.

    -Brett

  2. 2 Posted by David Banas on 11 Oct, 2017 10:20 PM

    David Banas's Avatar

    Thanks!

    I replaced “$$” with “\\[ <smb://[>“ / “\\] <smb://]>” and that seems to work.

    -db

  3. Support Staff 3 Posted by Brett on 11 Oct, 2017 11:14 PM

    Brett's Avatar

    Yep, at least in multimarkdown.

    - Brett

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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