Skip to content

Is conversion of markdown with mathjax supported? #194

Closed

Description

@Sebastian-Nielsen

Is conversion of markdown with mathjax supported?

Activity

  1. changed the title [-]Can it convert markdown with mathjax ?[/-] [+]Is conversion of markdown with mathjax supportedac?[/+] on Dec 2, 2020
  2. changed the title [-]Is conversion of markdown with mathjax supportedac?[/-] [+]Is conversion of markdown with mathjax supported?[/+] on Dec 2, 2020
  3. robinst commented on Dec 3, 2020

    @robinst
    Collaborator

    No. Can you point to other implementations that support it? I'd like to see what syntax they use and how they output it.

  4. Sebastian-Nielsen commented on Dec 3, 2020

    @Sebastian-Nielsen
    Author

    Sorry, I meant katex; anyways, I guess it is very easy to implement. source: stackoverflow

    Whenever you see $$ or $$$$ in the markdown, just enclose it in a p tag (or any tag really).

    So, this: "Hello, there this is $2=3\frac{2}{\pi}$ an inline comment, $$ 3 \neq 5$$ is not inline"

    Is in html:

    <p>Hello, there this is $2=3\frac{2}{\pi}$ an inline comment, $$ 3 \neq 5$$ is not inline</p>
    
    // if the html make use of katex, this has to be inserted at the bottom of the body tag:
    <script>
    $(document).ready(function () { // this need jquery
      renderMathInElement(document.body, {
        // ...options...
        delimiters: [
          { left: "$$", right: "$$", display: true },
          { left: "$", right: "$", display: false },
          { left: "\\[", right: "\\]", display: true }
        ]
      });
    });
    </script>
    
  5. robinst commented on Dec 11, 2020

    @robinst
    Collaborator

    Sounds like this can be done purely in JS on the resulting HTML, so no specific support is needed within commonmark-java. Let me know if that works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions