Skip to content

Adding delimiters to ignore non-math text #5

Description

@AnimeAllstar

My goal is to render part of the text in latex. For example:

{The sum of $$n$$ numbers is $$n(n+1)/2$$} should render as {The sum of n numbers is n(n+1)/2}.

Only everything in $$...$$ should be turned into an svg.

I have been trying to use the delimiter option in Mathjax. I'm guessing that this regards text outside the delimiters as non-math and renders is normally. But it appears to be doing nothing. I used this as my options for the MathJaxProvider:

{
        tex: {
            inlineMath: [ 
                ['$$', '$$']
            ]
        }
}

I only want part of the text to be processed to latex. Is all text in the latex prop assumed to be latex, or is there a MathJax option that I can add to skip normal text? I could manually delimit and insert <Tex2SVG latex={latex}/> whenever I do find a $$...$$ but maybe there is an in-built option or maybe a feature request?

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions