summaryrefslogtreecommitdiffstats
path: root/tdemarkdown/md4c/test/latex-math.txt
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2022-02-05 17:44:26 +0000
committerSlávek Banko <[email protected]>2022-04-17 18:35:01 +0200
commit95279fbf6dfeb43d80590740a9259d7caa614177 (patch)
tree8c3ff4de77102f1e55357dd81d650e9f22be69a0 /tdemarkdown/md4c/test/latex-math.txt
parenta291f3a0a3fab073c009f77a36745c5c7bd48e9b (diff)
downloadtdelibs-95279fbf6dfeb43d80590740a9259d7caa614177.tar.gz
tdelibs-95279fbf6dfeb43d80590740a9259d7caa614177.zip
Add tdemarkdown part - embeddable lightweight markdown viewing component.
TDEMarkdown is based on the md4c library and using TDEHTML for rendering its output. For enhanced safety, on HTML widget is turned off everything we don't need for viewing. It integrates nicely into Konqueror and supports both Commonmark and GitHub markdown syntaxes. Signed-off-by: Mavridis Philippe <[email protected]> Prepare to merge tdemarkdown into tdelibs. Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'tdemarkdown/md4c/test/latex-math.txt')
-rw-r--r--tdemarkdown/md4c/test/latex-math.txt39
1 files changed, 39 insertions, 0 deletions
diff --git a/tdemarkdown/md4c/test/latex-math.txt b/tdemarkdown/md4c/test/latex-math.txt
new file mode 100644
index 000000000..2a5774ce0
--- /dev/null
+++ b/tdemarkdown/md4c/test/latex-math.txt
@@ -0,0 +1,39 @@
+
+# LaTeX Math
+
+With the flag `MD_FLAG_LATEXMATHSPANS`, MD4C enables extension for recognition
+of LaTeX style math spans.
+
+A math span is is any text wrapped in dollars or double dollars (`$...$` or
+`$$...$$`).
+
+```````````````````````````````` example
+$a+b=c$ Hello, world!
+.
+<p><x-equation>a+b=c</x-equation> Hello, world!</p>
+````````````````````````````````
+
+If the double dollar sign is used, the math span is a display math span.
+
+```````````````````````````````` example
+This is a display equation: $$\int_a^b x dx$$.
+.
+<p>This is a display equation: <x-equation type="display">\int_a^b x dx</x-equation>.</p>
+````````````````````````````````
+
+Math spans may span multiple lines as they are normal spans:
+
+```````````````````````````````` example
+$$
+\int_a^b
+f(x) dx
+$$
+.
+<p><x-equation type="display">\int_a^b f(x) dx </x-equation></p>
+````````````````````````````````
+
+Note though that many (simple) renderers may output the math spans just as a
+verbatim text. (This includes the HTML renderer used by the `md2html` utility.)
+
+Only advanced renderers which implement LaTeX math syntax can be expected to
+provide better results.