feature: added latex

This commit is contained in:
Prof. Dr. Matthias Jung DL9MJ
2025-03-10 09:37:59 +01:00
parent 49a11637c8
commit 6e4809000a
2 changed files with 23 additions and 10 deletions
+9 -10
View File
@@ -2,6 +2,7 @@ import mistletoe
import pytest
from renderer.fifty_ohm_html_renderer import FiftyOhmHtmlRenderer
from renderer.fifty_ohm_latex_renderer import FiftyOhmLaTeXRenderer
from test.util import paragraph
@@ -15,13 +16,11 @@ def test_picture_html():
assert mistletoe.markdown(assertion, FiftyOhmHtmlRenderer) == paragraph(assertions[assertion])
#@pytest.mark.latex
#def test_underline_latex():
# assertions = {
# "<u>Text</u>": "\n\\underline{Text}\n",
# "<u> Text Text </u>": "\n\\underline{ Text Text }\n",
# "<u> Text *Text* </u>": "\n\\underline{ Text \emph{Text} }\n",
# }
#
# for assertion in assertions:
# assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == assertions[assertion]
@pytest.mark.latex
def test_picture_latex():
assertions = {
"[picture:123:abc:Text]": FiftyOhmLaTeXRenderer.render_picture_helper("123", "abc", "Text", "TODO"),
}
for assertion in assertions:
assert mistletoe.markdown(assertion, FiftyOhmLaTeXRenderer) == assertions[assertion]