From d071b4177c1a3897f4682e245046a45f362b6ac5 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Fri, 1 Oct 2021 14:21:33 +0200 Subject: Squashed 'deps/md4c/' content from commit 7f05330 git-subtree-dir: deps/md4c git-subtree-split: 7f0533068b4319d8cb3d0f33ca9aa66a857734a6 --- test/latex-math.txt | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 test/latex-math.txt (limited to 'test/latex-math.txt') diff --git a/test/latex-math.txt b/test/latex-math.txt new file mode 100644 index 0000000..2a5774c --- /dev/null +++ b/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! +. +

a+b=c Hello, world!

+```````````````````````````````` + +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$$. +. +

This is a display equation: \int_a^b x dx.

+```````````````````````````````` + +Math spans may span multiple lines as they are normal spans: + +```````````````````````````````` example +$$ +\int_a^b +f(x) dx +$$ +. +

\int_a^b f(x) dx

+```````````````````````````````` + +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. -- cgit v1.2.3