question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Best way to handle math ($ or $$) in markup

See original GitHub issue

What is the best way to handle embedded LaTex math code, such as can be displayed by GitHub.

Usually Mistune just passes the $ and $$ through as text, but sometimes it does not. Particularly, an expression such as:

$ \tilde{C}_t = \tanh(W_C \cdot [\hat{y}_{t-1},x_t]+b_C) $

Comes in from Mistune as:

Text: $ \tilde{C}
Emphasis: t = \tanh(W_C \cdot [\hat{y}
Text: {t-1},x_t]+b_C) $

Which makes sense, since Mistune is unaware of the $ escaped text, but it corrupts the math code, since the _'s do not indicate emphasis.

Also, are their any plans of supporting math encoding in the future?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lepturecommented, Jul 14, 2022

@jeffheaton check v3 branch, mistune v3 has built-in math plugin.

0reactions
lepturecommented, Sep 26, 2022

@jeffheaton I’ve just released v3.0.0rc1, it is quite stable now. I’m using v3 in production in Typlog.

The documentation is here: https://mistune.lepture.com/en/latest/plugins.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Math Markup Language (Chapter 4)
The most fundamental way of building up a mathematical expression in MathML content markup is the apply construct. An apply element typically applies...
Read more >
Markup or Margin . . . Which is Better?
Calculate your corrent markup; the one that provides the sales price that covers your job costs, overhead expenses, and makes a reasonable net...
Read more >
Markups & Markdowns - YouTube
Watch his video for help solving problems using " markup " and "markdown" ... Engage NY // Eureka Math Grade 5 Module 3...
Read more >
Markups and Markdowns - YouTube
Learn how to calculate markups and markdowns.Example problem: Shorts are on an end-of-the-season sale for 40% off. What is the sale price of ......
Read more >
Solving Markup and Markdown Problems with Percents
In this lesson, practice using percents to solve markdown and markup problems. Practice writing and solving equations, given real world ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found