Commit 2e965941edf90134a59f32ac7a912b183505490a

Martin Mitas 2019-07-07T10:59:20

Add/improve docs for the LaTeX math spans.

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c44dd8..fdd3d83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
 # MD4C Change Log
 
 
+## Next Version (Work in Progress)
+
+Changes:
+
+ * With `MD_FLAG_LATEXMATHSPANS`, LaTeX math spans (`$...$`) and LaTeX display
+   math spans (`$$...$$`) are recognized. (Note though that the HTML renderer
+   outputs them verbatim.) Thanks for the feature belong to [Tilman Roeder](
+   https://github.com/dyedgreen).
+
+
 ## Version 0.3.4
 
 Changes:
diff --git a/README.md b/README.md
index a026f6b..8656050 100644
--- a/README.md
+++ b/README.md
@@ -101,6 +101,10 @@ extensions:
  * With the flag `MD_FLAG_PERMISSIVEWWWAUTOLINKS` permissive WWW autolinks
    (without any scheme specified; `http:` is assumed) are supported.
 
+ * With the flag `MD_FLAG_LATEXMATHSPANS` LaTeX math spans (`$...$`) and
+   LaTeX display math spans (`$$...$$`) are supported. (Note though that the
+   HTML renderer outputs them verbatim.)
+
 The syntax of the extensions is described on [MD4C wiki].
 
 Few features (those some people see as mis-features) of CommonMark
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index b8e335b..88394f8 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -60,7 +60,7 @@ $PYTHON "$TEST_DIR/spec_tests.py" -s "$TEST_DIR/tasklists.txt" -p "$PROGRAM --ft
 
 echo
 echo "LaTeX extension:"
-$PYTHON "$TEST_DIR/spec_tests.py" -s "$TEST_DIR/latex.txt" -p "$PROGRAM --flatex-math"
+$PYTHON "$TEST_DIR/spec_tests.py" -s "$TEST_DIR/latex-math.txt" -p "$PROGRAM --flatex-math"
 
 echo
 echo "Pathological input:"
diff --git a/test/latex.txt b/test/latex.txt
deleted file mode 100644
index ed2b947..0000000
--- a/test/latex.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# LaTeX
-
-With the flag `MD_FLAG_LATEXMATHSPANS`, MD4C enables extension for recognition
-of LaTeX style equation spans.
-
-An equation is is any text wrapped in tildes ($ or $$).
-
-```````````````````````````````` example
-$a+b=c$ Hello, world!
-.
-<p><equation>a+b=c</equation> Hello, world!</p>
-````````````````````````````````
-
-If a double dollar sign is used, the equation is a display equation.
-
-```````````````````````````````` example
-This is a display equation: $$\int_a^b x dx$$.
-.
-<p>This is a display equation: <equation type="display">\int_a^b x dx</equation>.</p>
-````````````````````````````````
-
-Equations may span multiple lines.
-
-```````````````````````````````` example
-$$
-\int_a^b f(x) dx
-$$
-<p><equation type="display">\int_a^b f(x) dx </equation></p>
-````````````````````````````````