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.

Support for writing / rendering math equations

See original GitHub issue

It would be nice to support math equations embedded in text. Imagine the cool diagrams you can draw with labels using this support to illustrate geometry and physics problems.

One way to implement this would be to integrate LaTeX math mode in text. For example, $d = \sqrt{x^2 + y^2}$ would show up as .

Potential challenges:

  1. Can this be done in a lightweight manner?
  2. How difficult would it be to support artistic rendering in this mode?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:22
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
baptistecommented, Jan 30, 2022

@DanielJGeiger 's PR works wonderfully; I’ve just extracted all equations from a chapter of lecture slides and imported them – worked a charm.

Screenshot 2022-01-30 at 20 27 51

Unlike SVG images, these can be edited directly in place. I’m planning to create a “library” of equations for each chapter and give that to the students, with the suggestion that they make their own whiteboard “mindmap” organising the course content.

2reactions
baptistecommented, Jan 30, 2022

In case anyone else is interested, here’s the workflow I used:

  1. run de-macro on the original latex file, to replace all custom commands (\newcommand and \def) with their definition
  2. run pandoc with a custom lua filter to extract all equations from the latex file
  3. wrap each equation into a JSON object that can be imported in Excalidraw (specifically, the PR supporting Mathjax)

The bounding boxes aren’t correct until one double-clicks an equation, but that’s a trivial enough step to do manually

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to write and render LaTeX math formulas on Medium
In this article we list some methods to write and visualize math formulas on Medium: LaTeX to image, unicode conversion, browser addons, etc....
Read more >
Render mathematical expressions in Markdown
You can now use LaTeX style syntax to render math expressions within Markdown inline (using $ delimiters) or in blocks (using $$ delimiters)....
Read more >
MathJax | Beautiful math in all browsers.
High-quality display of mathematics notation in all browsers. · No special browser setup required. · Support for LaTeX, MathML, and other equation markup...
Read more >
Writing Equations - Ulysses Help
A well-known way of writing mathematical equations is with LaTeX. This document preparation system uses markup tags, much in the same way as...
Read more >
VS Code Math to Image: Write LaTeX Math Equations in ...
Although GitHub won't render math equations in Markdown files, they actually DO render LaTeX inside Jupyter notebooks. How? Well, GitHub has ...
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