gsantner / markor

Text editor - Notes & ToDo (for Android) - Markdown, todo.txt, plaintext, math, ..
https://github.com/gsantner/markor/discussions/2269
Other
3.73k stars 360 forks source link

asciidoc support for Equations and Formulas (STEM) #2299

Open b2arrival opened 4 months ago

b2arrival commented 4 months ago

⚠️ This issue respects the following points: ⚠️

Description

  1. Suport for Equations and Formulas in view mode in asciidoc with LaTeX and Screenshot_2024-05-21-10-56-40-851_com android chrome AsciiMath
= My Diabolical Mathematical Opus
Jamie Moriarty
:stem: latexmath

.An e-xciting limit with LaTeX!
[stem]
++++
\lim_{n \to \infty}\frac{n}{\sqrt[n]{n!}} = {\large e}
++++

.A basic square root with AsciiMath
[asciimath]
++++
sqrt(4) = 2
++++

Information

Android version: 13 ΤΡ1Α.220624.014 Device: POCO M4 Pro App Version: v2.11

Source

F-Droid

Format / File type

Something else (-> Additional info)

Additional info / Log

- acsiidoc
gsantner commented 4 months ago

Improvements are welcome. In Markdown also KaTex is available.
Maybe AsciiDoc is able to reuse that somehow for it's formula stuff.

b2arrival commented 4 months ago

Improvements are welcome. In Markdown also KaTex is available.
Maybe AsciiDoc is able to reuse that somehow for it's formula stuff.

I was able to render the mathematical expressions, injecting the following code into the preview mode body, according to the instructions in the asciimath page

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=AM_CHTML"></script>
<script src="ASCIIMathML.js"></script>