From 8802f814e859de39bd75600a97cabfb2f085c4a8 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Mon, 1 Apr 2024 15:59:21 -0600 Subject: [PATCH] test for latex --- test/test.py | 2 +- test/tm-cases/latex.html | 11 +++++++++++ test/tm-cases/latex.opts | 1 + test/tm-cases/latex.tags | 1 + test/tm-cases/latex.text | 10 ++++++++++ 5 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/tm-cases/latex.html create mode 100644 test/tm-cases/latex.opts create mode 100644 test/tm-cases/latex.tags create mode 100644 test/tm-cases/latex.text diff --git a/test/test.py b/test/test.py index 8cdf3a89..871cd2e1 100755 --- a/test/test.py +++ b/test/test.py @@ -38,7 +38,7 @@ def setup(): setup() default_tags = [] warnings = [] - for extra_lib in ('pygments', 'wavedrom'): + for extra_lib in ('pygments', 'wavedrom', 'latex2mathml'): try: mod = importlib.import_module(extra_lib) except ImportError: diff --git a/test/tm-cases/latex.html b/test/tm-cases/latex.html new file mode 100644 index 00000000..d5eec8ca --- /dev/null +++ b/test/tm-cases/latex.html @@ -0,0 +1,11 @@ +

Simple Test

+ +

Inline Equations can be written as y=mx+b. +Block equations are wrapped using

+ +x=b±b24ac2a + +

This code will render everywhere + +some random code, describing $a and $b will be rendered, $y=mx$ +

diff --git a/test/tm-cases/latex.opts b/test/tm-cases/latex.opts new file mode 100644 index 00000000..627b9f1f --- /dev/null +++ b/test/tm-cases/latex.opts @@ -0,0 +1 @@ +{"extras": ["latex","latex2mathml"]} \ No newline at end of file diff --git a/test/tm-cases/latex.tags b/test/tm-cases/latex.tags new file mode 100644 index 00000000..b39d550d --- /dev/null +++ b/test/tm-cases/latex.tags @@ -0,0 +1 @@ +extra latex latex2mathml \ No newline at end of file diff --git a/test/tm-cases/latex.text b/test/tm-cases/latex.text new file mode 100644 index 00000000..5b8933ce --- /dev/null +++ b/test/tm-cases/latex.text @@ -0,0 +1,10 @@ +## Simple Test +Inline Equations can be written as $y=mx+b$. +Block equations are wrapped using +$$ +x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} +$$ +This code will render everywhere +``` +some random code, describing $a and $b will be rendered, $y=mx$ +``` \ No newline at end of file